Re:Golang's network stack attempts to parse HTTP headers as ...
by papaf on Thursday January 21, 2021 @08:01AM
(#25858373)
The string type is utf8.
Actually its not guaranteed to be UTF-8, only a sequence of bytes with some convenience methods: https://golang.org/ref/spec#String_types
However, the existence of the 'strings' package and the 'range' operator give the impression that all strings are UTF-8.
You would think an old http header is a string. It's not. It looks like a string though :)