System-generated error responses
While we’re on the topic of errors, I’d like to mention that in certain scenarios Go’s http.Server
may still automatically generate and send plain-text HTTP responses. These scenarios include when:
Host
header, or multiple Host
headers.Transfer-Encoding
header.MaxHeaderBytes
setting.