Skip to content

Fix content-length in http/2#211

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

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

Conversation

@bduggan

@bduggan bduggan commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

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.

@librasteve librasteve left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@bduggan

bduggan commented Feb 28, 2026

Copy link
Copy Markdown
Contributor Author

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

bduggan commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

thanks!

@bduggan

bduggan commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

@japhb or @librasteve, I'd love to see a new version released that includes this bug fix -- anything I can do to help?

@librasteve

Copy link
Copy Markdown
Contributor

@bduggan - thanks for the nudge

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