mirror of
https://github.com/alibaba/tengine.git
synced 2026-03-13 07:51:16 +08:00
bugfix: POST request with keepalive peer cause 400 response
When the POST data sent is incomplete, the peer cannot be reused and should be discarded, otherwise the upstream server will discard some data from next request which use the same peer
This commit is contained in:
@@ -784,6 +784,10 @@ ngx_http_upstream_free_keepalive_peer(ngx_peer_connection_t *pc, void *data,
|
||||
goto closed;
|
||||
}
|
||||
|
||||
if (!u->request_body_sent) {
|
||||
goto closed;
|
||||
}
|
||||
|
||||
if (ngx_terminate || ngx_exiting) {
|
||||
goto closed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user