浏览代码

http2: remove h2-14 ALPN proto

"h2-14" was draft 14 of http2. It's past time to retire announcing it.
Everybody has been using "h2" in the wild for quite some time now.

The Google GFE doesn't accept it anymore either.

Change-Id: I087681a0a5e7117de3ab74a2f3f9e0ae45e007cd
Reviewed-on: https://go-review.googlesource.com/32576
Reviewed-by: Tom Bergan <tombergan@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Brad Fitzpatrick 9 年之前
父节点
当前提交
3389ddeea9
共有 2 个文件被更改,包括 1 次插入7 次删除
  1. 0 4
      http2/server.go
  2. 1 3
      http2/server_test.go

+ 0 - 4
http2/server.go

@@ -188,9 +188,6 @@ func ConfigureServer(s *http.Server, conf *Server) error {
 	if !haveNPN {
 		s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, NextProtoTLS)
 	}
-	// h2-14 is temporary (as of 2015-03-05) while we wait for all browsers
-	// to switch to "h2".
-	s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, "h2-14")
 
 	if s.TLSNextProto == nil {
 		s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){}
@@ -205,7 +202,6 @@ func ConfigureServer(s *http.Server, conf *Server) error {
 		})
 	}
 	s.TLSNextProto[NextProtoTLS] = protoHandler
-	s.TLSNextProto["h2-14"] = protoHandler // temporary; see above.
 	return nil
 }
 

+ 1 - 3
http2/server_test.go

@@ -80,9 +80,7 @@ func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}
 
 	tlsConfig := &tls.Config{
 		InsecureSkipVerify: true,
-		// The h2-14 is temporary, until curl is updated. (as used by unit tests
-		// in Docker)
-		NextProtos: []string{NextProtoTLS, "h2-14"},
+		NextProtos:         []string{NextProtoTLS},
 	}
 
 	var onlyServer, quiet bool