mirror of
https://github.com/curl/curl.git
synced 2026-08-25 23:23:31 +03:00
http: fix dead code in setting post client reader
- postsize was always 0, thus the check's else never happened
after the mime client reader was introduced
Follow-up to 0ba47146f7
Closes #13060
This commit is contained in:
parent
cc6f2f0064
commit
2ca530d2fa
1 changed files with 2 additions and 6 deletions
|
|
@ -1997,7 +1997,6 @@ CURLcode Curl_http_target(struct Curl_easy *data,
|
||||||
#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
|
#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
|
||||||
static CURLcode set_post_reader(struct Curl_easy *data, Curl_HttpReq httpreq)
|
static CURLcode set_post_reader(struct Curl_easy *data, Curl_HttpReq httpreq)
|
||||||
{
|
{
|
||||||
curl_off_t postsize = 0;
|
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
|
||||||
switch(httpreq) {
|
switch(httpreq) {
|
||||||
|
|
@ -2066,12 +2065,9 @@ static CURLcode set_post_reader(struct Curl_easy *data, Curl_HttpReq httpreq)
|
||||||
}
|
}
|
||||||
data->state.infilesize = Curl_creader_total_length(data);
|
data->state.infilesize = Curl_creader_total_length(data);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if(!postsize)
|
return Curl_creader_set_null(data);
|
||||||
result = Curl_creader_set_null(data);
|
|
||||||
else
|
|
||||||
result = Curl_creader_set_fread(data, postsize);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
/* never reached */
|
/* never reached */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue