mirror of
https://github.com/curl/curl.git
synced 2026-08-26 22:34:45 +03:00
http: revisit http_perhapsrewind()
- use facilities provided by client readers better - work also for non-uploading requests like GET/HEAD - update documentation Closes #13117
This commit is contained in:
parent
6ea75877fa
commit
77b0571cdc
3 changed files with 73 additions and 96 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include "http2.h"
|
||||
#include "http_proxy.h"
|
||||
#include "multiif.h"
|
||||
#include "sendf.h"
|
||||
#include "cf-h2-proxy.h"
|
||||
|
||||
/* The last 3 #include files should be in this order */
|
||||
|
|
@ -954,6 +955,9 @@ static CURLcode submit_CONNECT(struct Curl_cfilter *cf,
|
|||
struct httpreq *req = NULL;
|
||||
|
||||
result = Curl_http_proxy_create_CONNECT(&req, cf, data, 2);
|
||||
if(result)
|
||||
goto out;
|
||||
result = Curl_creader_set_null(data);
|
||||
if(result)
|
||||
goto out;
|
||||
|
||||
|
|
@ -1125,7 +1129,12 @@ static CURLcode cf_h2_proxy_connect(struct Curl_cfilter *cf,
|
|||
|
||||
out:
|
||||
*done = (result == CURLE_OK) && (ts->state == H2_TUNNEL_ESTABLISHED);
|
||||
cf->connected = *done;
|
||||
if(*done) {
|
||||
cf->connected = TRUE;
|
||||
/* The real request will follow the CONNECT, reset request partially */
|
||||
Curl_req_soft_reset(&data->req, data);
|
||||
Curl_client_reset(data);
|
||||
}
|
||||
CF_DATA_RESTORE(cf, save);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue