aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-09-07 11:03:23 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-09-07 11:28:12 +0200
commit13dbb41c4991bdd87768e0d3b6d3398cb1869676 (patch)
tree06570305ca58f988315066cfef4c2cf78c322e16 /lib/http.c
parente5c2354fd537968f034b35532d53b42c6cdf5169 (diff)
http2: first embryo toward Upgrade:
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c10
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 */