Skip to content

Only print body if there is a body#1314

Open
laeubi wants to merge 1 commit intoyegor256:masterfrom
laeubi:only_read_if_content
Open

Only print body if there is a body#1314
laeubi wants to merge 1 commit intoyegor256:masterfrom
laeubi:only_read_if_content

Conversation

@laeubi
Copy link
Copy Markdown

@laeubi laeubi commented Aug 2, 2024

Currently reading from a request can hang forever if there is no content available (e.g. GET / HEAD / DELETE / ...).

This adds a check if any of the content headers are there to indicate that actually something can be read.

Follow-Up for

Currently reading from a request can hang forever if there is no content
available (e.g. GET / HEAD / DELETE / ...).

This adds a check if any of the content headers are there to indicate
that actually something can be read.
@laeubi
Copy link
Copy Markdown
Author

laeubi commented Aug 2, 2024

Okay that don't work, because it seems some tests write a body without any content headers (what theoretically is allowed for HTTP 1.0 on connection close)... I'll have to think a little bit more about this.

@yegor256
Copy link
Copy Markdown
Owner

yegor256 commented Oct 1, 2025

@laeubi Thanks for your contribution! Unfortunately, we can't merge it without tests. Every feature we add and every bug we fix must be accompanied by at least one new test that confirms that the code was not working before. Without such a test, how can we know that what you commit actually works?

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