http2: Ignore Keep-Alive header in requests
Adds Keep-Alive to the list of ignored headers in encodeHeaders
as required in the HTTP/2 spec (section 8.1.2.2) and adds a test
to check this.
Fixes golang/go#15085
Change-Id: Ie4624680c5de1f13eb94fa58a2d5d67a02634df3
Reviewed-on: https://go-review.googlesource.com/21482
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/http2/transport_test.go b/http2/transport_test.go
index 07598b2..bcc2a5f 100644
--- a/http2/transport_test.go
+++ b/http2/transport_test.go
@@ -1642,6 +1642,11 @@
value: []string{"123"},
want: "Accept-Encoding,User-Agent",
},
+ {
+ key: "Keep-Alive",
+ value: []string{"doop"},
+ want: "Accept-Encoding,User-Agent",
+ },
}
for _, tt := range tests {