Skip to content

Commit

Permalink
http.c: log if it notices HTTP 1.1 after a upgrade to http2
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Nov 20, 2014
1 parent 4c3cfc7 commit d62706e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/http.c
Expand Up @@ -3216,6 +3216,12 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
&k->httpcode);
if(nc==3) {
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 {
/* this is the real world, not a Nirvana
Expand Down

0 comments on commit d62706e

Please sign in to comment.