Commit ef813c70 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

http2: remove _DRAFT09 from the NPN_HTTP2 enum

We're progressing throught drafts so there's no point in having a fixed
one in a symbol that'll survive.
parent 9317eced
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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 */
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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)) {
+2 −2
Original line number Diff line number Diff line
@@ -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) {