(size_t)data->req.p.http->postsize);
if(copy)
*chunk = copy;
- else
+ else {
+ data->state.hresult = CURLE_OUT_OF_MEMORY;
return HYPER_POLL_ERROR;
+ }
/* increasing the writebytecount here is a little premature but we
don't know exactly when the body is sent*/
data->req.writebytecount += (size_t)data->req.p.http->postsize;
CURLcode result =
Curl_fillreadbuffer(data, data->set.upload_buffer_size, &fillcount);
(void)ctx;
- if(result)
+ if(result) {
+ data->state.hresult = result;
return HYPER_POLL_ERROR;
+ }
if(!fillcount)
/* done! */
*chunk = NULL;
hyper_buf *copy = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
if(copy)
*chunk = copy;
- else
+ else {
+ data->state.hresult = CURLE_OUT_OF_MEMORY;
return HYPER_POLL_ERROR;
+ }
/* increasing the writebytecount here is a little premature but we
don't know exactly when the body is sent*/
data->req.writebytecount += fillcount;
hyper_code code = hyper_error_code(hypererr);
failf(data, "Hyper: [%d] %.*s", (int)code, (int)errlen, errbuf);
hyper_error_free(hypererr);
+ if(data->state.hresult)
+ return data->state.hresult;
}
return CURLE_OUT_OF_MEMORY;
}
# Verify data after the test has been "shot"
<verify>
<protocol>
+%if !hyper
POST /%TESTNUMBER HTTP/1.1\r
Host: %HOSTIP:%HTTPPORT\r
Accept: */*\r
Content-Length: 1\r
Content-Type: application/x-www-form-urlencoded\r
\r
+%endif
</protocol>
# 42 - aborted by callback
<errorcode>