RFR: 8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Mon May 10 19:13:47 UTC 2021

> Hi,
> Please find here a fix to prevent an assertion error from firing in the com.sun.net.httpserver.
> The issue occurs systematically when all of these conditions are met:
> 1. System assertions are enabled
> 2. The handler doesn't read or close the request input stream
> 3. The handler sends a reply with no content (just headers, but no body)
> 3. The handler doesn't close the response output stream
> 4. The handler doesn't close the HttpExchange
> The test fails with the assertion error when run without the fix (provided system assertions are enabled) and passes with the fix.

Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:

  Added a second test case which triggers the assertion under different conditions


  - all: https://git.openjdk.java.net/jdk/pull/3923/files
  - new: https://git.openjdk.java.net/jdk/pull/3923/files/4bcfb5e4..23cc8913

 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3923&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3923&range=00-01

  Stats: 75 lines in 1 file changed: 60 ins; 7 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3923.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3923/head:pull/3923

PR: https://git.openjdk.java.net/jdk/pull/3923

More information about the net-dev mailing list