Most servers have the http request header length limit(4k~8k). Usually we split the long headers into several parts. For golang http package, I remember that it combines headers with the same key value into one giant header. Is this correct?
Like if I have a token which length exceeds the 8k limit. I'd like to split into several parts with the same header key Authorization. Then send request using http package. Does this split make sense or not?
Hmm, I'm not sure that's quite valid. The Headers
object is actually a map of string keys pointing to string slices.
https://golang.org/pkg/net/http/#Header
As such, if you try to set the same key it will be overwritten as per standard golang map functionality.