Skip to content

Fix content-length in http/2#211

Merged
japhb merged 3 commits intocroservices:mainfrom
bduggan:add-content-length
Mar 2, 2026
Merged

Fix content-length in http/2#211
japhb merged 3 commits intocroservices:mainfrom
bduggan:add-content-length

Conversation

@bduggan
Copy link
Contributor

@bduggan bduggan commented Feb 19, 2026

This PR fixes issues with the content-length header in http/2 -- see #73 and #206

The content length header is not set for http/2 requests, as described
in croservices#73.

This fixes that by calling has-body before setting the headers, which has
a side effect of setting the body serializer and the content-length
header.
Copy link
Contributor

@librasteve librasteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks reasonable to me and the code is clean.

@librasteve
Copy link
Contributor

I have reviewed for any nasties (though I am not an expert on HTTP2) - happy for this to be merged.

@bduggan
Copy link
Contributor Author

bduggan commented Feb 28, 2026

Anything else I can do to help move this forwards?
cc @japhb

@japhb japhb merged commit 33a890f into croservices:main Mar 2, 2026
2 checks passed
@bduggan
Copy link
Contributor Author

bduggan commented Mar 2, 2026

thanks!

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.

3 participants