diff --git a/src/proto_http.c b/src/proto_http.c index 24c7cf890..e4732284d 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5341,6 +5341,11 @@ int http_request_forward_body(struct session *s, struct channel *req, int an_bit channel_auto_read(req); } + /* if we received everything, we don't want to expire anymore */ + if (msg->msg_state == HTTP_MSG_DONE) { + req->flags |= CF_READ_NOEXP; + req->rex = TICK_ETERNITY; + } return 0; } } @@ -6529,6 +6534,12 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi } return 1; } + + /* if we received everything, we don't want to expire anymore */ + if (msg->msg_state == HTTP_MSG_DONE) { + res->flags |= CF_READ_NOEXP; + res->rex = TICK_ETERNITY; + } return 0; } } diff --git a/src/session.c b/src/session.c index 08241674f..48bdf7eaf 100644 --- a/src/session.c +++ b/src/session.c @@ -2411,20 +2411,6 @@ struct task *process_session(struct task *t) s->si[0].flags &= ~(SI_FL_ERR|SI_FL_EXP); s->si[1].flags &= ~(SI_FL_ERR|SI_FL_EXP); - /* Trick: if a request is being waiting for the server to respond, - * and if we know the server can timeout, we don't want the timeout - * to expire on the client side first, but we're still interested - * in passing data from the client to the server (eg: POST). Thus, - * we can cancel the client's request timeout if the server's - * request timeout is set and the server has not yet sent a response. - */ - - if ((s->rep->flags & (CF_AUTO_CLOSE|CF_SHUTR)) == 0 && - (tick_isset(s->req->wex) || tick_isset(s->rep->rex))) { - s->req->flags |= CF_READ_NOEXP; - s->req->rex = TICK_ETERNITY; - } - /* When any of the stream interfaces is attached to an applet, * we have to call it here. Note that this one may wake the * task up again. If at least one applet was called, the current