News for hackers. Stuff that matters.
Re:Golang's network stack attempts to parse HTTP headers as ... by yokaze on Thursday January 21, 2021 @07:34AM (#25858204)
> That's a terrible reason. HTTP header values are not necessarily UTF-8, and an implementation that blindly assumes they are is broken.

Actually, they are explicitly specified as ASCII ("follow the same generic format as that given in Section 3.1 of RFC 822"): https://tools.ietf.org/html/rfc822#section-3.1

Re:Golang's network stack attempts to parse HTTP headers as ... by vaduz on Thursday January 21, 2021 @09:28AM (#25859125)
> Actually, they are explicitly specified as ASCII

They are not, only new headers added after RFC 7320 are ASCII, pre-existing ones may contain high-bit characters which implementations compliant with 7230 version of HTTP/1.1 SHOULD not parse. They stopped short from making it a MUST so that applications compliant with RFC 2616 (where they were to be treated as ISO-8859-1!) was allowed. Or, more simply, they stopped themselves from making RFC 7230 describe new, incompatible HTTP/1.2.

https://tools.ietf.org/html/rfc7230#section-3.2.4

Re:Golang's network stack attempts to parse HTTP headers as ... by Thaxll on Thursday January 21, 2021 @08:34AM (#25858615)