[dev] possible "bug" in ngx_http_read_discarded_body_handler
Manlio Perillo
manlio_perillo at libero.it
Mon Oct 1 22:46:56 MSD 2007
Hi.
I'm reading the ngx_http_request_body source file version 0.5.31, and I
have found a possible "bug":
static void
ngx_http_read_discarded_body_handler(ngx_http_request_t *r)
{
ngx_int_t rc;
rc = ngx_http_read_discarded_body(r);
if (rc == NGX_AGAIN) {
if (ngx_handle_read_event(r->connection->read, 0) == NGX_ERROR)
{
ngx_http_finalize_request(r, rc);
return;
}
}
I think that the code should be:
if (rc == NGX_AGAIN) {
if (ngx_handle_read_event(r->connection->read, 0) == NGX_ERROR)
{
ngx_http_finalize_request(r, NGX_ERROR);
return;
}
}
If I'm wrong, then I do not understand why to finalize with NGX_AGAIN.
Regards Manlio Perillo
More information about the nginx
mailing list