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
textproto.CanonicalMIMEHeaderKey ignores keys with _ in. If an htttp server returns one of these, then it isn't possible to use http.Header.Get to fetch it as it doesn't get canonicalized.
The Backblaze server returns this header all in lower case. Because it doesn't get canonicalised by textproto.CanonicalMIMEHeaderKey it remains in lower case and consequently `resp.Header.Get("X-Bz-Info-src_last_modified_millis") doesn't find it.
This is easy enough to work around, but caused me a bit of suprise and debugging!
Oh, sorry, this slipped through everybody's cracks. We've all been so focused on the Go 1.6 dashboard and nobody triaged this for a few days when it came in (oh, Dec 29th), dooming it.
textproto.CanonicalMIMEHeaderKey ignores keys with
_
in. If an htttp server returns one of these, then it isn't possible to usehttp.Header.Get
to fetch it as it doesn't get canonicalized.For example, Backblaze use keys with
_
in to store metadata - see the X-Bz-Info-src_last_modified_millis in the upload docs.The Backblaze server returns this header all in lower case. Because it doesn't get canonicalised by
textproto.CanonicalMIMEHeaderKey
it remains in lower case and consequently `resp.Header.Get("X-Bz-Info-src_last_modified_millis") doesn't find it.This is easy enough to work around, but caused me a bit of suprise and debugging!
The comment on textproto/reader.go on validHeaderFieldByte explains the problem nicely!
This could cause problems with S3 also which uses a similar scheme for returning user defined metadata too.
The text was updated successfully, but these errors were encountered: