]> granicus.if.org Git - curl/commitdiff
http2: remove _DRAFT09 from the NPN_HTTP2 enum
authorDaniel Stenberg <daniel@haxx.se>
Mon, 31 Mar 2014 06:40:24 +0000 (08:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 31 Mar 2014 06:40:24 +0000 (08:40 +0200)
We're progressing throught drafts so there's no point in having a fixed
one in a symbol that'll survive.

lib/http.c
lib/urldata.h
lib/vtls/gtls.c
lib/vtls/nss.c
lib/vtls/openssl.c

index 4a29058c2d61a597e4d72e19a969e7bc259b4ec8..53e5af04fa9cc53f87efbf5fad0df770f3658889 100644 (file)
@@ -1674,8 +1674,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
   *done = TRUE;
 
   switch (conn->negnpn) {
-    case NPN_HTTP2_DRAFT09:
-      infof(data, "http, we have to use HTTP-draft-09/2\n");
+    case NPN_HTTP2:
+      infof(data, "Negotiated http2\n");
       Curl_http2_init(conn);
       Curl_http2_switched(conn);
       break;
index 25f96769321399cf8fb0c6d0e2c856a2de25ffe9..9b34645eb379e2a9aa585681e722d5cd87b5e7e7 100644 (file)
@@ -595,7 +595,7 @@ enum upgrade101 {
 enum negotiatenpn {
   NPN_INIT,                   /* default state */
   NPN_HTTP1_1,                /* HTTP/1.1 negotiated */
-  NPN_HTTP2_DRAFT09           /* HTTP-draft-0.9/2.0 negotiated */
+  NPN_HTTP2                   /* HTTP2 (draft-xx) negotiated */
 };
 
 /*
index 5d335e849cde195588c0d066c189b259fe282229..2a98787159fd33ea68629e788d569cc6f63ecf12 100644 (file)
@@ -883,7 +883,7 @@ gtls_connect_step3(struct connectdata *conn,
       if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN &&
         memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data,
         NGHTTP2_PROTO_VERSION_ID_LEN) == 0) {
-        conn->negnpn = NPN_HTTP2_DRAFT09;
+        conn->negnpn = NPN_HTTP2;
       }
       else if(proto.size == ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1,
           proto.data, ALPN_HTTP_1_1_LENGTH) == 0) {
index 80e26e2ea4ca9ac321acd03b874bcd5d9e537cfe..577716fd56a6bfaa3035522daf49d24deb1d97c0 100644 (file)
@@ -657,7 +657,7 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg)
     if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN &&
        memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)
        == 0) {
-      conn->negnpn = NPN_HTTP2_DRAFT09;
+      conn->negnpn = NPN_HTTP2;
     }
     else if(buflen == ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1, buf,
                                                      ALPN_HTTP_1_1_LENGTH)) {
index 0014e588c0af672a72fea4887bf9d97e1dd985c1..dc94b8982d845c1089c80375cf79b4b6a49c9bb3 100644 (file)
@@ -1431,7 +1431,7 @@ select_next_proto_cb(SSL *ssl,
 
   if(retval == 1) {
     infof(conn->data, "NPN, negotiated HTTP2\n");
-    conn->negnpn = NPN_HTTP2_DRAFT09;
+    conn->negnpn = NPN_HTTP2;
   }
   else if(retval == 0) {
     infof(conn->data, "NPN, negotiated HTTP1.1\n");
@@ -2003,7 +2003,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex)
 
         if(len == NGHTTP2_PROTO_VERSION_ID_LEN &&
            memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len) == 0) {
-             conn->negnpn = NPN_HTTP2_DRAFT09;
+             conn->negnpn = NPN_HTTP2;
         }
         else if(len == ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1,
             neg_protocol, ALPN_HTTP_1_1_LENGTH) == 0) {