From f2db0dca0b0399c08319d22cbcbfa83be2bb781a Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Sat, 19 Apr 2025 13:50:35 +0100 Subject: 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 Reviewed-by: Carlos Amedee LUCI-TryBot-Result: Go LUCI --- doc/next/6-stdlib/99-minor/net/http/httptest/31054.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/next/6-stdlib/99-minor/net/http/httptest/31054.md (limited to 'doc') diff --git a/doc/next/6-stdlib/99-minor/net/http/httptest/31054.md b/doc/next/6-stdlib/99-minor/net/http/httptest/31054.md new file mode 100644 index 0000000000..ef6a4898f2 --- /dev/null +++ b/doc/next/6-stdlib/99-minor/net/http/httptest/31054.md @@ -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. -- cgit v1.3-5-g9baa