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

Daniel Fuchs dfuchs at openjdk.java.net
Mon May 10 19:31:32 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:

  Removed obsolete comments

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3923/files
  - new: https://git.openjdk.java.net/jdk/pull/3923/files/23cc8913..0ff70363

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

  Stats: 6 lines in 1 file changed: 0 ins; 6 del; 0 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