mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:53:39 +03:00
parent
68975fba02
commit
f2619b1767
1 changed files with 13 additions and 4 deletions
|
|
@ -532,8 +532,12 @@ static int uploadpostfields(void *userdata, hyper_context *ctx,
|
|||
*chunk = NULL; /* nothing more to deliver */
|
||||
else {
|
||||
/* send everything off in a single go */
|
||||
*chunk = hyper_buf_copy(data->set.postfields,
|
||||
(size_t)data->req.p.http->postsize);
|
||||
hyper_buf *copy = hyper_buf_copy(data->set.postfields,
|
||||
(size_t)data->req.p.http->postsize);
|
||||
if(copy)
|
||||
*chunk = copy;
|
||||
else
|
||||
return HYPER_POLL_ERROR;
|
||||
data->req.upload_done = TRUE;
|
||||
}
|
||||
return HYPER_POLL_READY;
|
||||
|
|
@ -552,8 +556,13 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
|||
if(!fillcount)
|
||||
/* done! */
|
||||
*chunk = NULL;
|
||||
else
|
||||
*chunk = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
|
||||
else {
|
||||
hyper_buf *copy = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
|
||||
if(copy)
|
||||
*chunk = copy;
|
||||
else
|
||||
return HYPER_POLL_ERROR;
|
||||
}
|
||||
return HYPER_POLL_READY;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue