8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers#19555
8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers#19555jaikiran wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
|
@jaikiran This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
src/jdk.httpserver/share/classes/sun/net/httpserver/UnmodifiableHeaders.java
Outdated
Show resolved
Hide resolved
…leHeaders.java Co-authored-by: Daniel Fuchs <67001856+dfuch@users.noreply.github.com>
|
Thank you Daniel and Michael for the reviews. CI tier tests came back fine. I'll go ahead with the integration shortly. |
|
/integrate |
|
Going to push as commit 6882b38.
Your commit was automatically rebased without conflicts. |
Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8333590?
As noted in that issue the
sun.net.httpserver.UnmodifiableHeaders, an internal class, within thejdk.httpservermodule doesn't override thetoString()method.UnmodifiableHeadersis of typecom.sun.net.httpserver.Headerswhich is a public API in thejdk.httpservermodule.When applications call
Headers.toString(), if the instance is of typeUnmodifiableHeaders, then the returnedStringrepresentation shows empty headers, even when it isn't empty. The commit in this PR fixes the issue by implementingtoString()in theUnmodifiableHeadersto return the correct representation of the headers.An existing jtreg test has been updated to reproduce this issue and verify the fix.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19555/head:pull/19555$ git checkout pull/19555Update a local copy of the PR:
$ git checkout pull/19555$ git pull https://git.openjdk.org/jdk.git pull/19555/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19555View PR using the GUI difftool:
$ git pr show -t 19555Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19555.diff
Webrev
Link to Webrev Comment