> Can I please get a review of this change which proposes to address the issue 
> noted in https://bugs.openjdk.org/browse/JDK-8373778?
> 
> When a CONNECT request to a proxy returns an invalid status line, then the 
> current code in the internal implementation of `HttpURLConnection` runs into 
> an exception trying to parse that status line. That exception propagates as 
> an unspecified `java.util.NoSuchElementException` to the application.
> 
> The commit in this PR addresses it by doing additional checks on the status 
> line to ensure it is valid and if it isn't then it raises an `IOException`. 
> This is the same `IOException` that would have been raised for a few other 
> invalid responses for a CONNECT request.
> 
> A new jtreg test has been introduced to reproduce the issue and verify the 
> fix. tier1, tier2, tier3 testing succeeded with this change.

Jaikiran Pai has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains eight additional commits since 
the last revision:

 - Michael's review - make sure the status line parsing considers only the 
space character
 - merge latest from master branch
 - Volkan's review - use -1 instead of 0
 - Volkan's review - update test
 - merge latest from master branch
 - add additional bad status lines
 - Daniel's review - minor cleanup to the test
 - 8373778: java.util.NoSuchElementException in HttpURLConnection.doTunneling0 
when connecting via HTTPS

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/30466/files
  - new: https://git.openjdk.org/jdk/pull/30466/files/29061d32..3dbc2eb8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=30466&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30466&range=04-05

  Stats: 12399 lines in 358 files changed: 7012 ins; 1951 del; 3436 mod
  Patch: https://git.openjdk.org/jdk/pull/30466.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30466/head:pull/30466

PR: https://git.openjdk.org/jdk/pull/30466

Reply via email to