Skip to content

Conversation

@nigoroll
Copy link
Member

otherwise keep the existing logic of sending no Content-Length header if there is no request body.

This code runs before vcl_backend_fetch, so should VCL gain back control over Content-Length as proposed in #4331, it will be possible again to override this default.

Fixes #4331 for the special case

@dridi
Copy link
Member

dridi commented May 16, 2025

See #4331 (comment).

In the absence of a bereq.body, I think we should rather strip content-length: 0 based on the method (when it is known not to anticipate data) and force the addition of content-length: 0 for other methods.

otherwise keep the existing logic of sending no Content-Length header if there
is no request body.

This code runs before vcl_backend_fetch, so should VCL gain back control over
Content-Length as proposed in varnishcache#4331, it will be possible again to override this
default.

Fixes varnishcache#4331 for the special case
@nigoroll
Copy link
Member Author

nigoroll commented Jun 2, 2025

Superseded by #4340

@nigoroll nigoroll closed this Jun 2, 2025
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

Successfully merging this pull request may close these issues.

on removing content-length for 0-length POST requests

2 participants