summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/request.c')
-rw-r--r--libs/libcurl/src/request.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/libs/libcurl/src/request.c b/libs/libcurl/src/request.c
index 66130d3f1d..a4fa833e93 100644
--- a/libs/libcurl/src/request.c
+++ b/libs/libcurl/src/request.c
@@ -66,7 +66,8 @@ CURLcode Curl_req_soft_reset(struct SingleRequest *req,
req->headerbytecount = 0;
req->allheadercount = 0;
req->deductheadercount = 0;
-
+ req->httpversion_sent = 0;
+ req->httpversion = 0;
result = Curl_client_start(data);
if(result)
return result;
@@ -162,9 +163,6 @@ void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data)
req->no_body = data->set.opt_no_body;
req->authneg = FALSE;
req->shutdown = FALSE;
-#ifdef USE_HYPER
- req->bodywritten = FALSE;
-#endif
}
void Curl_req_free(struct SingleRequest *req, struct Curl_easy *data)
@@ -261,7 +259,7 @@ static CURLcode req_send_buffer_flush(struct Curl_easy *data)
return result;
}
-CURLcode Curl_req_set_upload_done(struct Curl_easy *data)
+static CURLcode req_set_upload_done(struct Curl_easy *data)
{
DEBUGASSERT(!data->req.upload_done);
data->req.upload_done = TRUE;
@@ -339,7 +337,7 @@ static CURLcode req_flush(struct Curl_easy *data)
if(!done)
return CURLE_AGAIN;
}
- return Curl_req_set_upload_done(data);
+ return req_set_upload_done(data);
}
return CURLE_OK;
}
@@ -360,8 +358,6 @@ static ssize_t add_from_client(void *reader_ctx,
return (ssize_t)nread;
}
-#ifndef USE_HYPER
-
static CURLcode req_send_buffer_add(struct Curl_easy *data,
const char *buf, size_t blen,
size_t hds_len)
@@ -378,7 +374,8 @@ static CURLcode req_send_buffer_add(struct Curl_easy *data,
return CURLE_OK;
}
-CURLcode Curl_req_send(struct Curl_easy *data, struct dynbuf *req)
+CURLcode Curl_req_send(struct Curl_easy *data, struct dynbuf *req,
+ unsigned char httpversion)
{
CURLcode result;
const char *buf;
@@ -387,6 +384,7 @@ CURLcode Curl_req_send(struct Curl_easy *data, struct dynbuf *req)
if(!data || !data->conn)
return CURLE_FAILED_INIT;
+ data->req.httpversion_sent = httpversion;
buf = Curl_dyn_ptr(req);
blen = Curl_dyn_len(req);
if(!Curl_creader_total_length(data)) {
@@ -411,7 +409,6 @@ CURLcode Curl_req_send(struct Curl_easy *data, struct dynbuf *req)
}
return CURLE_OK;
}
-#endif /* !USE_HYPER */
bool Curl_req_sendbuf_empty(struct Curl_easy *data)
{
@@ -464,7 +461,7 @@ CURLcode Curl_req_abort_sending(struct Curl_easy *data)
data->req.upload_aborted = TRUE;
/* no longer KEEP_SEND and KEEP_SEND_PAUSE */
data->req.keepon &= ~KEEP_SENDBITS;
- return Curl_req_set_upload_done(data);
+ return req_set_upload_done(data);
}
return CURLE_OK;
}