summaryrefslogtreecommitdiff
path: root/libgo/go/net/http/client_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/http/client_test.go')
-rw-r--r--libgo/go/net/http/client_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/net/http/client_test.go b/libgo/go/net/http/client_test.go
index 09fcc1c0b40..c61b17d289b 100644
--- a/libgo/go/net/http/client_test.go
+++ b/libgo/go/net/http/client_test.go
@@ -235,6 +235,12 @@ func TestRedirects(t *testing.T) {
if urlError, ok := err.(*url.Error); !ok || urlError.Err != checkErr {
t.Errorf("with redirects forbidden, expected a *url.Error with our 'no redirects allowed' error inside; got %#v (%q)", err, err)
}
+ if res == nil {
+ t.Fatalf("Expected a non-nil Response on CheckRedirect failure (http://golang.org/issue/3795)")
+ }
+ if res.Header.Get("Location") == "" {
+ t.Errorf("no Location header in Response")
+ }
}
var expectedCookies = []*Cookie{