On Wed, 17 Dec 2025 10:58:29 GMT, Daniel Fuchs <[email protected]> wrote:
>> The first byte of a SSL ClientHello handshake record is 0x16 (22). >> If the first byte received on a HTTP/1.1 clear connection is 0x16, the HTTP >> server could fail fast, return 400 bad request and immediately close the >> connection. >> >> This changeset extends the fail fast behaviour for other ineligible bytes, >> such as any byte corresponding to ASCII characters <= 31. > > Daniel Fuchs has updated the pull request incrementally with two additional > commits since the last revision: > > - Update test/jdk/com/sun/net/httpserver/ClearTextServerSSL.java > > Co-authored-by: Andrey Turbanov <[email protected]> > - Update src/jdk.httpserver/share/classes/sun/net/httpserver/Request.java > > Co-authored-by: Andrey Turbanov <[email protected]> src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 743: > 741: } catch (ProtocolException pe) { > 742: logger.log(Level.DEBUG, pe.toString()); > 743: logger.log(Level.DEBUG, "Bad first char in request > line: closing"); Could we perhaps combine these 2 lines into one: logger.log(Level.DEBUG, "closing due to: " + pe.toString()); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28827#discussion_r2626659192
