http2: use HTTP/2 in the HTTP/1.1-alike header
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 May 2016 09:16:30 +0000 (11:16 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 19 May 2016 09:16:30 +0000 (11:16 +0200)
... when generating them, not "2.0" as the protocol is called just
HTTP/2 and nothing else.

lib/http2.c

index 5ca1ac451155300528fc360fb9d16b224bd14bea..3fe02a57acaf33fc110fedb927c903bad7e74732 100644 (file)
@@ -877,7 +877,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
     stream->status_code = decode_status_code(value, valuelen);
     DEBUGASSERT(stream->status_code != -1);
 
-    Curl_add_buffer(stream->header_recvbuf, "HTTP/2.0 ", 9);
+    Curl_add_buffer(stream->header_recvbuf, "HTTP/2 ", 7);
     Curl_add_buffer(stream->header_recvbuf, value, valuelen);
     /* the space character after the status code is mandatory */
     Curl_add_buffer(stream->header_recvbuf, " \r\n", 3);