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

Replace http.NoBody with oohttp.NoBody in adapter #50

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

nazzrrg
Copy link

@nazzrrg nazzrrg commented Nov 15, 2023

http2actualContentLength in h2_bundle.go compares request body against oohttp.NoBody, but not against http.Body. This results for unknown reqBodyContentLength of -1 for readTrackingBody with underlying http.NoBody thus leading to a weird frames pattern, i.e. on the screenshot below a DATA frame is sent after a absent-bodied GET-request HEADER frame
image

Given stdlibwrapper.go is an adaptor for standard http requests, I put the replacement there.

Copy link
Contributor

@bassosimone bassosimone left a comment

Choose a reason for hiding this comment

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

🐳

@bassosimone
Copy link
Contributor

Good thinking!

@bassosimone bassosimone merged commit 221fe75 into ooni:main Nov 22, 2023
1 check passed
danilakovtunn added a commit to danilakovtunn/oohttp that referenced this pull request Feb 13, 2024
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.

2 participants