MEDIUM: http-ana: handle read error on server side if waiting for response
A read error on the server side is also reported as a write error on the client side. It means some times, a server side error is handled on the client side. Among others, it is the case when the client side is waiting for the response while the request processing is already finished. In this case, the error is not handled as a server error. It is not accurate. So now, when the request processing is finished but not the response processing and if a read error was encountered on the server side, the error is not immediatly processed on the client side, to let a chance to response analysers to properly catch the error.
This commit is contained in:
parent
3d87558f35
commit
f506d96839
|
@ -1013,7 +1013,13 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||
((req->flags & CF_SHUTW) && (req->to_forward || co_data(req)))) {
|
||||
/* Output closed while we were sending data. We must abort and
|
||||
* wake the other side up.
|
||||
*
|
||||
* If we have finished to send the request and the response is
|
||||
* still in progress, don't catch write error on the request
|
||||
* side if it is in fact a read error on the server side.
|
||||
*/
|
||||
if (msg->msg_state == HTTP_MSG_DONE && (s->res.flags & CF_READ_ERROR) && s->res.analysers)
|
||||
return 0;
|
||||
|
||||
/* Don't abort yet if we had L7 retries activated and it
|
||||
* was a write error, we may recover.
|
||||
|
|
Loading…
Reference in New Issue