]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: document restrictions on ETag as expected by ServeContent
authorJoe Tsai <joetsai@digital-static.net>
Sat, 26 Nov 2016 18:18:39 +0000 (10:18 -0800)
committerJoe Tsai <thebrokentoaster@gmail.com>
Mon, 28 Nov 2016 19:27:55 +0000 (19:27 +0000)
Fixes #18054

Change-Id: I6773943a95b92eebd7e347f8f7a80843b4827243
Reviewed-on: https://go-review.googlesource.com/33630
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/net/http/fs.go

index 1ff36d2d99dc569858d522c7740f70b300ede706..bf63bb5441f31a3187c1d0ddfb1ac19bf1b4550c 100644 (file)
@@ -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) {