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

Headers on server cannot be set after entity was sent #8042

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

tomas-langer
Copy link
Member

, or output stream was requested (throws IllegalStateException)

Content length is removed from headers before being sent if expecting chunked encoding in HTTP/1.1

Resolves #8003

Description

Usability fix.
The methods now throw IllegalStateException when an attempt is done to do something that is wrong.
This may cause errors in existing code, where the problem was silently ignored and the headers were never set. As this is a bugfix, this behavior change is needed.

Updated javadoc of header(Header) method on ServerResponse to declare the exception

…am was requested (throws IllegalStateException)

Content length is removed from headers before being sent if expecting chunked encoding in HTTP/1.1

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
@tomas-langer tomas-langer added bug Something isn't working 4.x Version 4.x labels Nov 20, 2023
@tomas-langer tomas-langer added this to the 4.0.1 milestone Nov 20, 2023
@tomas-langer tomas-langer self-assigned this Nov 20, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 20, 2023
@tomas-langer tomas-langer merged commit 91f6828 into helidon-io:main Nov 20, 2023
12 checks passed
@tomas-langer tomas-langer deleted the 8003-input-stream branch November 20, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: Output with setting contentLength is corrupted
2 participants