mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:53:46 +03:00
lib: remove bad set.opt_no_body assignments
This struct field MUST remain what the application set it to, so that handle reuse and handle duplication work. Instead, the request state bit 'no_body' is introduced for code flows that need to change this in run-time. Closes #9888
This commit is contained in:
parent
dafdb20a26
commit
bf12c2bed6
13 changed files with 30 additions and 28 deletions
|
|
@ -4115,6 +4115,7 @@ CURLcode Curl_connect(struct Curl_easy *data,
|
|||
Curl_free_request_state(data);
|
||||
memset(&data->req, 0, sizeof(struct SingleRequest));
|
||||
data->req.size = data->req.maxdownload = -1;
|
||||
data->req.no_body = data->set.opt_no_body;
|
||||
|
||||
/* call the stuff that needs to be called */
|
||||
result = create_conn(data, &conn, asyncp);
|
||||
|
|
@ -4176,7 +4177,7 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
|
|||
data->state.done = FALSE; /* *_done() is not called yet */
|
||||
data->state.expect100header = FALSE;
|
||||
|
||||
if(data->set.opt_no_body)
|
||||
if(data->req.no_body)
|
||||
/* in HTTP lingo, no body means using the HEAD request... */
|
||||
data->state.httpreq = HTTPREQ_HEAD;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue