summaryrefslogtreecommitdiff
path: root/libgo/go/http/response_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/http/response_test.go')
-rw-r--r--libgo/go/http/response_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/libgo/go/http/response_test.go b/libgo/go/http/response_test.go
index bf63ccb9e96..ef67fdd2dc3 100644
--- a/libgo/go/http/response_test.go
+++ b/libgo/go/http/response_test.go
@@ -164,6 +164,28 @@ var respTests = []respTest{
"Body here\n",
},
+ // Chunked response in response to a HEAD request (the "chunked" should
+ // be ignored, as HEAD responses never have bodies)
+ {
+ "HTTP/1.0 200 OK\r\n" +
+ "Transfer-Encoding: chunked\r\n" +
+ "\r\n",
+
+ Response{
+ Status: "200 OK",
+ StatusCode: 200,
+ Proto: "HTTP/1.0",
+ ProtoMajor: 1,
+ ProtoMinor: 0,
+ RequestMethod: "HEAD",
+ Header: Header{},
+ Close: true,
+ ContentLength: 0,
+ },
+
+ "",
+ },
+
// Status line without a Reason-Phrase, but trailing space.
// (permitted by RFC 2616)
{