naiveproxy/src/net
klzgrad 90cae99ff1 net/spdy: Add support for HTTP/2 CONNECT Fast Open
SpdyProxyClientSocket waits for 200 OK before returning OK for Connect.

Change that behavior to returning OK immediately after CONNECT header.

This feature is enabled by a "fastopen" header via the proxy delegate.

Design notes:

The current approach is better than the obvious TCP Fast Open style fake
Connect().

Fast Open should not be used for preconnects as preconnects need actual
connections set up. The Naive client does not use preconnects per se
(using "...RawConnect") but the user agent will use preconnects and the
Naive client has to infer that. Hence there is a need to check the
incoming socket for available bytes right before Connect() and configure
whether a socket should be connected with Fast Open. But fake Connect()
make it difficult to check the incoming socket because it immediately
returns and there is not enough time for the first read of the incoming
socket to arrive.

To check for preconnects it is best to push the first read of the
incoming socket to as late as possible. The other (wrong) way of doing
that is to pass in an early read callback and call it immediately after
sending HEADERS and then send the available bytes right there. This way
is wrong because it does not work with late binding, which assumes
Connect() is idempotent and causes sockets opened in this way to be
potentially bound to the wrong socket requests.

The current approach is to return OK in Connect() right after sending
HEADERS before getting the reply, which is to be received later. If the
reply is received during a subsequent Read() and the reply indicates an
error, the error is returned to the callback of the Read(); otherwise
the error is ignored with the connection disconnected and subsequent
Read() and Write() should discover the disconnection.
2024-11-21 19:58:39 +08:00
..
android android: net: Add Android stubs 2024-11-20 19:33:57 +08:00
base net: Allow http proxies in proxy chains 2024-11-21 19:58:39 +08:00
cert net/cert: Fix iwyu 2024-11-21 19:58:39 +08:00
cert_net Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
cookies Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
data/ssl/chrome_root_store Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
device_bound_sessions Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
disk_cache Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
dns build: Remove tests and minimize 2024-11-20 19:33:56 +08:00
docs Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
extras Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
filter Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
first_party_sets Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
http net: Allow http proxies in proxy chains 2024-11-21 19:58:39 +08:00
log Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
network_error_logging Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
nqe Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
ntlm Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
proxy_resolution Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
quic Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
reporting Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
server Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
shared_dictionary Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
socket net/socket: Use SO_REUSEPORT for server sockets 2024-11-21 19:58:39 +08:00
spdy net/spdy: Add support for HTTP/2 CONNECT Fast Open 2024-11-21 19:58:39 +08:00
ssl Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
storage_access_api Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
test Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
third_party build: Remove tests and minimize 2024-11-20 19:33:56 +08:00
tools build: Remove tests and minimize 2024-11-20 19:33:56 +08:00
traffic_annotation Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
url_request Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
websockets Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
BUILD.gn net/cert: Use builtin verifier on Android and Linux 2024-11-21 19:58:39 +08:00
COMMON_METADATA Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
DEPS Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
DIR_METADATA Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
features.gni net/cert: Use builtin verifier on Android and Linux 2024-11-21 19:58:39 +08:00
OWNERS Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
PRESUBMIT.py Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00
README.md Import chromium-131.0.6778.86 2024-11-20 19:32:56 +08:00

Chrome Networking Stack

This directory contains the code behind Chrome's networking stack. It is documented here.