You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Comment and Name header fields are UTF-8 strings in Go, but the underlying format requires NUL-terminated ISO 8859-1 (Latin-1). NUL or non-Latin-1 runes in those strings will lead to an error on Write.
@bradfitz: should we have a OWNERS file in the tree?
if you think it's reasonable, I will file a separate issue.
(actually I'm thinking that once an issue is triaged, the
gopherbot should automatically add /cc of the package
owner to the issue, and this should save us some work.
see also golang.org/cl/13475 for background)
I've never seen that comment before, and I agree it seems somewhat out of place at first impression. Here's my understanding:
It's talking about the Comment and Name fields in gzip.Header.
Those fields are Go strings.
Canonically, Go strings are UTF-8, so they can represent any sequence of Unicode characters (including embedded NULs).
However, the underlying gzip file format only allows Comment and Name to contain the Unicode characters U+0001 through U+00FF (because it's actually Latin-1 with a NUL terminator).
If the Comment or Name fields contain other characters, then gzip.(*Writer).Write will return an error.
The docs for gzip.NewWriter include:
But I'm not exactly sure what it's trying to say.
/cc @nigeltao @mdempsky @adg @dsymonds (not sure who owns this)
The text was updated successfully, but these errors were encountered: