-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8287134: HttpURLConnection chunked streaming mode doesn't enforce specified size #12137
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
Conversation
/csr needed |
👋 Welcome back ccleary! A progress list of the required criteria for merging this PR into |
A CSR will be required to be submitted for this change. I will create this and allow for a review period of this PR before finalizing it. |
@c-cleary this pull request will not be integrated until the CSR request JDK-8300848 for issue JDK-8287134 has been approved. |
Webrevs
|
A related CSR has been created here: https://bugs.openjdk.org/browse/JDK-8300848 Seeking review on that as well before moving forward. |
* each chunk. This includes a chunk size header given as a | ||
* hexidecimal string (minimum of 1 byte), two CRLF's (4 bytes) | ||
* and a minimum payload length of 1 byte. If chunklen is less | ||
* than or equal to 5, a default value will be used. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest something like this:
chunklen The number of bytes to be written in
each chunk, including the chunk header as a
hexadecimal string (minimum of 1 byte), two CRLF's (4 bytes)
and a minimum payload length of 1 byte. If chunklen is less
than or equal to 5, a higher default value will be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Michael-Mc-Mahon, I updated the text with respect to your suggestion there (which was definitely a bit more clear than mine) and corrected my spelling of hexadecimal in my most recent changes just now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new text looks good to me.
Thanks Daniel! The related CSR has now been updated to reflect the new text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
@c-cleary 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 171 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 48152ef.
Your commit was automatically rebased without conflicts. |
Description
When using
HttpURLConnection::setChunkedStreamingMode()
, the current documentation does not make it clear that thechunklen
parameter refers to the amount of bytes sent on the wire per HTTP/1.1 chunk and not the payload length per chunk. Thechunklen
parameter takes into account the bytes used for the chunk size header, two CRLF characters and the possible payload length inclusively.Summary of Changes & Justification
The API text has been updated to reflect the actual behavior of the method as described above to avoid a similar bug being submitted in the future and to make it clear what the
chunklen
parameter specifies.This change will require a csr.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12137/head:pull/12137
$ git checkout pull/12137
Update a local copy of the PR:
$ git checkout pull/12137
$ git pull https://git.openjdk.org/jdk pull/12137/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12137
View PR using the GUI difftool:
$ git pr show -t 12137
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12137.diff