diff options
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index c95616bdd..3b18c6311 100644 --- a/lib/http.c +++ b/lib/http.c @@ -75,6 +75,7 @@ #include "non-ascii.h" #include "bundles.h" #include "pipeline.h" +#include "http2.h" #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> @@ -2179,6 +2180,15 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) return result; + if(!(conn->handler->flags&PROTOPT_SSL) && + (data->set.httpversion == CURL_HTTP_VERSION_2_0)) { + /* append HTTP2 updrade magic stuff to the HTTP request if it isn't done + over SSL */ + result = Curl_http2_request(req_buffer, conn); + if(result) + return result; + } + #if !defined(CURL_DISABLE_COOKIES) if(data->cookies || addcookies) { struct Cookie *co=NULL; /* no cookies from start */ |