TUN-5405: Update net package to v0.0.0-20211109214657-ef0fda0de508

This version contains fix to https://github.com/golang/go/issues/43989
This commit is contained in:
cthuang
2021-11-10 17:20:10 +00:00
parent 794635fb54
commit 7024d193c9
28 changed files with 1679 additions and 982 deletions

View File

@@ -341,7 +341,12 @@ func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) {
}
for _, k := range keys {
vv := h[k]
k = lowerHeader(k)
k, ascii := lowerHeader(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
continue
}
if !validWireHeaderFieldName(k) {
// Skip it as backup paranoia. Per
// golang.org/issue/14048, these should