diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-03-19 13:44:18 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-19 13:44:18 +0100 |
commit | abfab1786ed771e2d0ab659c845fd1108f60c71d (patch) | |
tree | 9fc6a85313b2db2f2cc948fcac5b2aa74df5b62c | |
parent | 9e66d3f4d3c0a5507943a2ee90c8fec4aae88168 (diff) |
HTTP: don't switch to HTTP/2 from 1.1 until we get the 101
We prematurely changed protocol handler to HTTP/2 which made things very
slow (and wrong).
Reported-by: Stefan Eissing
Bug: https://github.com/bagder/curl/issues/169
-rw-r--r-- | lib/http2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/http2.c b/lib/http2.c index 66a0adbc0..4c9d9f760 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -640,10 +640,6 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req, if(result) return result; - result = Curl_http2_setup(conn); - if(result) - return result; - /* As long as we have a fixed set of settings, we don't have to dynamically * figure out the base64 strings since it'll always be the same. However, * the settings will likely not be fixed every time in the future. @@ -1011,6 +1007,10 @@ CURLcode Curl_http2_switched(struct connectdata *conn, int rv; struct SessionHandle *data = conn->data; + result = Curl_http2_setup(conn); + if(result) + return result; + httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET]; httpc->send_underlying = (sending)conn->send[FIRSTSOCKET]; conn->recv[FIRSTSOCKET] = http2_recv; |