1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

http.c: log if it notices HTTP 1.1 after a upgrade to http2

This commit is contained in:
Daniel Stenberg 2014-09-06 00:05:03 +02:00
parent 4c3cfc7558
commit d62706ec6d

View File

@ -3216,6 +3216,12 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
&k->httpcode); &k->httpcode);
if(nc==3) { if(nc==3) {
conn->httpversion += 10 * httpversion_major; conn->httpversion += 10 * httpversion_major;
if(k->upgr101 == UPGR101_RECEIVED) {
/* supposedly upgraded to http2 now */
if(conn->httpversion != 20)
infof(data, "Lying server, not serving HTTP/2\n");
}
} }
else { else {
/* this is the real world, not a Nirvana /* this is the real world, not a Nirvana