Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/http/httptest: don't panic on Close of user-constructed Server value
If the user created an httptest.Server directly without using a constructor it won't have the new unexported 'client' field. So don't assume it's non-nil. Fixes golang#19729 Change-Id: Ie92e5da66cf4e7fb8d95f3ad0f4e3987d3ae8b77 Reviewed-on: https://go-review.googlesource.com/38710 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters