mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 20:49:01 -04:00
Set error if http_body_rewind() fails.
This commit is contained in:
parent
ec901d0339
commit
af899f15e0
@ -1017,7 +1017,11 @@ pyhttp_get_body(struct pyhttp_request *pyreq, void *closure)
|
||||
u_int8_t data[BUFSIZ];
|
||||
|
||||
kore_buf_init(&buf, 1024);
|
||||
http_body_rewind(pyreq->req);
|
||||
if (!http_body_rewind(pyreq->req)) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"http_body_rewind() failed");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
ret = http_body_read(pyreq->req, data, sizeof(data));
|
||||
|
Loading…
x
Reference in New Issue
Block a user