removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. See RFC 7230, section 6.1
(h http.Header)
| 1585 | // removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. |
| 1586 | // See RFC 7230, section 6.1 |
| 1587 | func removeConnectionHeaders(h http.Header) { |
| 1588 | for _, f := range h["Connection"] { |
| 1589 | for sf := range strings.SplitSeq(f, ",") { |
| 1590 | if sf = textproto.TrimString(sf); sf != "" { |
| 1591 | h.Del(sf) |
| 1592 | } |
| 1593 | } |
| 1594 | } |
| 1595 | } |
| 1596 | |
| 1597 | // statusError returns an error value that has a status code. |
| 1598 | func statusError(err error) error { |
no test coverage detected