mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net/http/httptest: redirect example.com requests to server
The default server cert used by NewServer already includes example.com in its DNSNames, and by default, the client's RootCA configuration means it won't trust a response from the real example.com. Fixes #31054 Change-Id: I0686977e5ffe2c2f22f3fc09a47ee8ecc44765db Reviewed-on: https://go-review.googlesource.com/c/go/+/666855 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
d86ec92499
commit
f2db0dca0b
3 changed files with 71 additions and 2 deletions
2
doc/next/6-stdlib/99-minor/net/http/httptest/31054.md
Normal file
2
doc/next/6-stdlib/99-minor/net/http/httptest/31054.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
The HTTP client returned by [Server.Client] will now redirect requests for
|
||||
`example.com` and any subdomains to the server being tested.
|
||||
Loading…
Add table
Add a link
Reference in a new issue