When using HTTP1, the Host header is automatically set in title case ("Host"). If I set the header in lowercase, an additional title cased header is added.
host: example.com
Host: example.com
Sugggestion would be to update fhttp/request.go:
Line 624 in func (r *Request) write(w io.Writer, usingProxy bool, extraHeaders Header, waitForContinue func() bool) (err error)
old:
if _, ok := r.Header["Host"]; !ok {
r.Header.Set("Host", host)
}
new:
foundHost := false
for k := range r.Header {
if strings.EqualFold(k, "Host") {
foundHost = true
break
}
}
if !foundHost {
r.Header.Set("Host", host)
}
When using HTTP1, the Host header is automatically set in title case ("Host"). If I set the header in lowercase, an additional title cased header is added.
host: example.com
Host: example.com
Sugggestion would be to update fhttp/request.go:
Line 624 in func (r *Request) write(w io.Writer, usingProxy bool, extraHeaders Header, waitForContinue func() bool) (err error)
old:
new: