Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:head request stubbing always sets the Content-Length to 0 #50

Open
dup2 opened this issue Mar 16, 2023 · 0 comments
Open

:head request stubbing always sets the Content-Length to 0 #50

dup2 opened this issue Mar 16, 2023 · 0 comments
Labels

Comments

@dup2
Copy link

dup2 commented Mar 16, 2023

Describe the bug 🐛

When stubbing a :head request and trying to set a custom "Content-Length" via the headers, the value is always set to "0" in the result.

How to replicate it

WebMock.stub(:head, "http://127.0.0.1:9000/bucket-1/file-1?").
          to_return(headers: { "Content-Length" => "42" })

Expected

Doing the effective request should return headers with Content-Length set to 42

@dup2 dup2 added the bug label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant