]> Cypherpunks repositories - gostls13.git/commit
compress/gzip: specify when Reader.Header is valid
authorJoe Tsai <joetsai@digital-static.net>
Thu, 12 Nov 2015 18:41:09 +0000 (10:41 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 13 Nov 2015 09:16:53 +0000 (09:16 +0000)
commitd3a4e8ed3c7a1929eea13f9de9fb1aa3cab71ad4
tree5a2b3097d910ac2744c831bd8bade93818ddf22e
parent2a031e6a2a4f7d83b80f9333bbd4f5d80a4873cf
compress/gzip: specify when Reader.Header is valid

The gzip package is asymmetrical in the way it handles headers.
In Writer, the Header is written on the first call to Write, Flush, or Close.
In Reader, the Header is read on calls to NewReader or Reset as opposed to
after the first Read. Thus, we document this difference.

Fixes #13211

Change-Id: I5f87beff036e5e2fd68a02a15fdb7137e9ca4c37
Reviewed-on: https://go-review.googlesource.com/16838
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/compress/gzip/gunzip.go
src/compress/gzip/gzip.go