From: Joe Tsai Date: Sat, 26 Nov 2016 18:18:39 +0000 (-0800) Subject: net/http: document restrictions on ETag as expected by ServeContent X-Git-Tag: go1.8beta1~48 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=993214a083d47afba7ba0ecf85ce5f35b1685358;p=gostls13.git net/http: document restrictions on ETag as expected by ServeContent Fixes #18054 Change-Id: I6773943a95b92eebd7e347f8f7a80843b4827243 Reviewed-on: https://go-review.googlesource.com/33630 Reviewed-by: Brad Fitzpatrick Run-TryBot: Joe Tsai TryBot-Result: Gobot Gobot --- diff --git a/src/net/http/fs.go b/src/net/http/fs.go index 1ff36d2d99..bf63bb5441 100644 --- a/src/net/http/fs.go +++ b/src/net/http/fs.go @@ -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) {