Skip to content

wptserve: detect TLS ClientHello on non-TLS HTTP server#59569

Open
gsnedders wants to merge 1 commit intoweb-platform-tests:masterfrom
gsnedders:http-server-tls-log
Open

wptserve: detect TLS ClientHello on non-TLS HTTP server#59569
gsnedders wants to merge 1 commit intoweb-platform-tests:masterfrom
gsnedders:http-server-tls-log

Conversation

@gsnedders
Copy link
Copy Markdown
Member

When a browser, e.g. one that does HTTPS-by-default, sends a TLS
ClientHello to our (non-TLS) HTTP port, the binary data falls through
into parse_request() which emits confusing "Bad HTTP/0.9 request type"
and "Bad request version" warnings with garbled binary characters, and
then loops reading further into the TLS record body.

Instead, we detect the ClientHello and log one info-level message
before closing the connection.

Fixes: #51342

When a browser, e.g. one that does HTTPS-by-default, sends a TLS
ClientHello to our (non-TLS) HTTP port, the binary data falls through
into parse_request() which emits confusing "Bad HTTP/0.9 request type"
and "Bad request version" warnings with garbled binary characters, and
then loops reading further into the TLS record body.

Instead, we detect the ClientHello and log one info-level message
before closing the connection.

Fixes: web-platform-tests#51342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lots of logging from HTTPS-by-default requests

3 participants