ngx_int_t
ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
{
- ngx_int_t rc;
ngx_uint_t i, err;
ngx_http_err_page_t *err_page;
ngx_http_core_loc_conf_t *clcf;
"http special response: %d, \"%V?%V\"",
error, &r->uri, &r->args);
- rc = ngx_http_discard_request_body(r);
-
- if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
- error = NGX_HTTP_INTERNAL_SERVER_ERROR;
- }
-
r->err_status = error;
if (r->keepalive) {
}
}
+ if (ngx_http_discard_request_body(r) != NGX_OK) {
+ error = NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
if (clcf->msie_refresh
&& r->headers_in.msie
&& (error == NGX_HTTP_MOVED_PERMANENTLY