Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connections made for WebSockets requests cannot offer HTTP/2, so we currently clear the ALPN list. Instead, still offer ALPN, but with just "http/1.1". This has no impact on the selected HTTP protocol, but it does change behavior slightly. The server may either ignore ALPN (in which case, we use HTTP/1.1) or negotiate ALPN and explicitly select HTTP/1.1. My immediate motivation is that, when we add support for HTTPS records, we won't be able to process the records correctly if we don't know the ALPN protocol list. However, this has two other benefits: 1. We harden against cross-protocol attacks like ALPACA. If some non-HTTPS TLS-based protocol also uses Web PKI certificates, an ALPN negotiation avoids a mixup between that protocol's and HTTPS clients or vice versa. However, while Chrome always offers ALPN for HTTPS, we missed WSS. This CL fixes this. 2. We currently gate False Start on ALPN (historically there were compatibility issues). This change allows TLS 1.2 WSS servers to save a round-trip. (IIRC, NGINX still negotiates ALPN with http/1.1 to pick up this optimization.) It also matches MaybeForceHTTP11, which is part of handling HTTP_1_1_REQUIRED (maybe also some auth cases?), as well as Firefox and Safari behavior. Bug: 1287240 Change-Id: I99d8c1654c4572090350c8164d3f6c7dfd02218a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3390109 Reviewed-by: Adam Rice <ricea@chromium.org> Commit-Queue: David Benjamin <davidben@chromium.org> Cr-Commit-Position: refs/heads/main@{#963607}
- Loading branch information
Showing
3 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters