mirror of https://git.kore.io/kore.git
Fix a problem with http_timeout when a body is sent.
When receiving an HTTP body, Kore never reset http_timeout once the transfer was done. This can result in a 408 being thrown by Kore while a request is activity running.
This commit is contained in:
parent
b3c5ce8375
commit
5dcf3d1550
|
@ -919,6 +919,7 @@ http_header_recv(struct netbuf *nb)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->content_length == 0) {
|
if (req->content_length == 0) {
|
||||||
|
c->http_timeout = 0;
|
||||||
req->flags |= HTTP_REQUEST_COMPLETE;
|
req->flags |= HTTP_REQUEST_COMPLETE;
|
||||||
req->flags &= ~HTTP_REQUEST_EXPECT_BODY;
|
req->flags &= ~HTTP_REQUEST_EXPECT_BODY;
|
||||||
return (KORE_RESULT_OK);
|
return (KORE_RESULT_OK);
|
||||||
|
@ -2342,6 +2343,7 @@ http_body_update(struct http_request *req, const void *data, size_t len)
|
||||||
req->content_length -= len;
|
req->content_length -= len;
|
||||||
|
|
||||||
if (req->content_length == 0) {
|
if (req->content_length == 0) {
|
||||||
|
req->owner->http_timeout = 0;
|
||||||
req->owner->rnb->extra = NULL;
|
req->owner->rnb->extra = NULL;
|
||||||
http_request_wakeup(req);
|
http_request_wakeup(req);
|
||||||
req->flags |= HTTP_REQUEST_COMPLETE;
|
req->flags |= HTTP_REQUEST_COMPLETE;
|
||||||
|
|
Loading…
Reference in New Issue