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

Responses with status code 204 over HTTPS not working as expected #1122

Open
jonas-z-ericsson opened this issue Mar 27, 2024 · 0 comments
Open

Comments

@jonas-z-ericsson
Copy link

Description of the bug

https://datatracker.ietf.org/doc/html/rfc7230#section-3.3

All 1xx (Informational), 204 (No Content), and 304 (Not Modified) responses do not include a message body.

But when receiving e.g. a 204 when using HTTPS the receiving buffer contains '0\r\n'.
This will break some http clients.

It is probably related to this bug: #865

But now it only has that behaviour for requests with method HEAD: https://github.com/SpectoLabs/hoverfly/blob/master/vendor/github.com/SpectoLabs/goproxy/https.go#L289

Steps to reproduce the issue

Same as #865

Observed result

Hoverfly error messages seen (If none, say none)

None

Some clients can't handle this behaviour properly, e.g. jetty-client 12.0.7 for Java.

image

If possible, add screenshots to help explain your problem

Expected result

Additional relevant information

  1. Hoverfly version: 1.8.0
  2. Anything that might help us to diagnose the problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant