Commit 993214a0 authored by Joe Tsai's avatar Joe Tsai Committed by Joe Tsai

net/http: document restrictions on ETag as expected by ServeContent

Fixes #18054

Change-Id: I6773943a95b92eebd7e347f8f7a80843b4827243
Reviewed-on: https://go-review.googlesource.com/33630Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent e2d5e54e
......@@ -116,8 +116,8 @@ func dirList(w ResponseWriter, f File) {
// The content's Seek method must work: ServeContent uses
// a seek to the end of the content to determine its size.
//
// If the caller has set w's ETag header, ServeContent uses it to
// handle requests using If-Match, If-None-Match, or If-Range.
// If the caller has set w's ETag header formatted per RFC 7232, section 2.3,
// ServeContent uses it to handle requests using If-Match, If-None-Match, or If-Range.
//
// Note that *os.File implements the io.ReadSeeker interface.
func ServeContent(w ResponseWriter, req *Request, name string, modtime time.Time, content io.ReadSeeker) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment