]> Cypherpunks repositories - gostls13.git/commit
net/http: support If-Match in ServeContent
authorDan Harrington <harringtond@google.com>
Tue, 25 Oct 2016 19:51:39 +0000 (12:51 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 3 Nov 2016 18:14:56 +0000 (18:14 +0000)
commitf3862742b67a84edf939f41276360ada4e7197a6
tree775ea5f50baa3497e8a700a9984220d8c4dcbd96
parent18f0e88103aaa429e92564312b4ee966dcb77102
net/http: support If-Match in ServeContent

- Added support for If-Match and If-Unmodified-Since.
- Precondition checks now more strictly follow RFC 7232 section 6, which
affects precedence when multiple condition headers are present.
- When serving a 304, Last-Modified header is now removed when no ETag is
present (as suggested by RFC 7232 section 4.1).
- If-None-Match supports multiple ETags.
- ETag comparison now correctly handles weak ETags.

Fixes #17572

Change-Id: I35039dea6811480ccf2889f8ed9c6a39ce34bfff
Reviewed-on: https://go-review.googlesource.com/32014
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/export_test.go
src/net/http/fs.go
src/net/http/fs_test.go