go/src/net/http
Kévin Dunglas 972870da11 net/http/httputil: forward 1xx responses in ReverseProxy
Support for 1xx responses has recently been merged in
net/http (CL 269997).

As discussed in this CL
(https://go-review.googlesource.com/c/go/+/269997/comments/1ff70bef_c25a829a),
support for forwarding 1xx responses in ReverseProxy has been extracted
in this separate patch.

According to RFC 7231, "a proxy MUST forward 1xx responses unless the
proxy itself requested the generation of the 1xx response".
Consequently, all received 1xx responses are automatically forwarded as long as the
underlying transport supports ClientTrace.Got1xxResponse.

Fixes #26088
Fixes #51914

Change-Id: I3a35ea023b798bfe56b7fb8696d5a49695229cfd
GitHub-Last-Rev: dab8a461fb
GitHub-Pull-Request: golang/go#53164
Reviewed-on: https://go-review.googlesource.com/c/go/+/409536
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Rhys Hiltner <rhys@justin.tv>
Run-TryBot: hopehook <hopehook@golangcn.org>
2022-09-14 23:59:32 +00:00
..
cgi net/http/cgi: use strings.Builder 2022-09-06 17:34:50 +00:00
cookiejar net/http/cookiejar: remove duplicate words from comments 2022-08-22 20:34:19 +00:00
fcgi all: consistently use US spelling of present participles 2022-04-08 13:44:41 +00:00
httptest net/http/httptest: allow multiple fields be present in one Trailer field 2022-04-11 23:17:38 +00:00
httptrace net/http/httptrace: use strings.Builder 2022-09-06 17:34:30 +00:00
httputil net/http/httputil: forward 1xx responses in ReverseProxy 2022-09-14 23:59:32 +00:00
internal all: gofmt main repo 2022-04-11 16:34:30 +00:00
pprof net/http/pprof: link docs to runtime/pprof 2022-08-31 09:38:38 +00:00
testdata
alpn_test.go
client.go all: replace hand-rolled atomicBool types with atomic.Bool 2022-08-12 16:41:47 +00:00
client_test.go net/http: skip Get flakes in TestClientTimeout tests on windows/arm4 2022-08-22 20:13:29 +00:00
clientserver_test.go net/http: unskip TestEarlyHintsRequest_h2 2022-05-17 20:51:53 +00:00
clone.go
cookie.go net/http: allow zero-valued Expires in Cookie.Valid 2022-08-15 18:58:51 +00:00
cookie_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
doc.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
example_filesystem_test.go
example_handle_test.go
example_test.go
export_test.go net/http: deflake TestTransportConnectionCloseOnRequest 2022-04-20 17:51:39 +00:00
filetransport.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
filetransport_test.go
fs.go net/http: FileServer method check + minimal OPTIONS implementation 2022-08-29 17:12:01 +00:00
fs_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
h2_bundle.go all: update vendored golang.org/x/net 2022-09-06 23:07:55 +00:00
h2_error.go net/http: add errors.As support for x/net/http2.StreamError 2022-08-26 18:03:42 +00:00
h2_error_test.go net/http: add errors.As support for x/net/http2.StreamError 2022-08-26 18:03:42 +00:00
header.go http: improve Get documentation 2022-07-18 15:58:37 +00:00
header_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
http.go net/http: switch HTTP1 to ASCII equivalents of string functions 2021-05-10 23:42:56 +00:00
http_test.go net/http: check that Unicode-aware functions are not used 2021-05-11 18:22:54 +00:00
jar.go
main_test.go net/http: adjust a substring which matches "uninteresting" goroutine 2021-11-05 21:34:10 +00:00
method.go
omithttp2.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
proxy_test.go
range_test.go
readrequest_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
request.go net/http: don't panic on very large MaxBytesReaderLimit 2022-08-26 18:17:27 +00:00
request_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
requestwrite_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
response.go net/http: optimize StatusText implementation 2022-04-15 17:03:50 +00:00
response_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
responsewrite_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
roundtrip.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
roundtrip_js.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
serve_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
server.go net/http: convert allowQuerySemicolonsInUse to atomic type 2022-09-09 18:42:57 +00:00
server_test.go net/http: also use Server.ReadHeaderTimeout for TLS handshake deadline 2021-10-14 22:15:24 +00:00
sniff.go net/http: drop mimesniff for audio/basic 2022-04-20 21:51:06 +00:00
sniff_test.go net/http: fix ResponseWriter.ReadFrom with short reads 2021-06-04 17:33:24 +00:00
socks_bundle.go cmd/internal/moddeps: use filepath.SkipDir only on directories 2021-05-19 15:20:08 +00:00
status.go net/http: doc: update RFC reference for appropriate HTTP codes 2022-06-10 23:30:35 +00:00
transfer.go net/http: don't strip whitespace from Transfer-Encoding headers 2022-06-29 20:22:10 +00:00
transfer_test.go net/http: correctly show error types in transfer test 2022-04-17 01:33:13 +00:00
transport.go net/http: make DefaultTransport docs about HTTP proxy consistent 2022-09-13 17:41:36 +00:00
transport_default_js.go net/http: guarantee that the Transport dial functions are respected in js/wasm 2021-10-28 17:57:57 +00:00
transport_default_other.go net/http: guarantee that the Transport dial functions are respected in js/wasm 2021-10-28 17:57:57 +00:00
transport_internal_test.go net/http: deflake request-not-written path 2022-02-14 17:30:31 +00:00
transport_test.go net/http: use strings.Builder 2022-09-07 01:07:32 +00:00
triv.go net/http: using strings.Builder 2022-09-06 21:52:12 +00:00