]> Cypherpunks.ru repositories - gostls13.git/commit
net/http: handle 3xx responses with no Location
authorDamien Neil <dneil@google.com>
Tue, 4 Jan 2022 18:34:50 +0000 (10:34 -0800)
committerDamien Neil <dneil@google.com>
Thu, 31 Mar 2022 23:30:43 +0000 (23:30 +0000)
commita41763539c7ad09a22720a517a28e6018ca4db0f
tree0bde212ab0529a136569fa7e238a2e274337b815
parentfb2a9d27e395af5bb0c88d0fa453bba868275800
net/http: handle 3xx responses with no Location

RFC 7231 does not require that a 3xx response contain a Location header.
When receiving such a response, just return it to the caller rather than
treating it as an error.

Fixes #49281.

Change-Id: I66c06d81b0922016384a0f4ff32bf52e3a3d5983
Reviewed-on: https://go-review.googlesource.com/c/go/+/375354
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/client.go
src/net/http/client_test.go