]> Cypherpunks repositories - gostls13.git/commit
net/http: check If-Range header when request method is HEAD
authorJoe Kyo <xunianzu@gmail.com>
Wed, 9 Aug 2017 02:26:45 +0000 (03:26 +0100)
committerTom Bergan <tombergan@google.com>
Wed, 9 Aug 2017 15:42:50 +0000 (15:42 +0000)
commit6a7c4d69cb72f857b21c36ef077de0b97d9dbd50
tree8effdbaf8f7e2b796b5af40a43e84eb4e51633a6
parentff560ee9507cb6b3da1405faf41d6ade637118b7
net/http: check If-Range header when request method is HEAD

When If-Range does not match and the requested resource is
available, server should return a "200 OK" response to client.
Currently server returns "200 OK" when the request method is
GET, but "206 Partial Content" when method is HEAD.
This change fixed this inconsistency.

Change-Id: I5ad979919f4f089baba54a4445b70ca38471a906
Reviewed-on: https://go-review.googlesource.com/54110
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
src/net/http/fs.go
src/net/http/fs_test.go