Fixed request finalization in ngx_http_index_handler().

Returning 500 instead of NGX_ERROR is preferable here because
header has not yet been sent to the client.
This commit is contained in:
Ruslan Ermilov 2019-12-16 15:19:01 +03:00
parent be45a3aa59
commit 48086f79ad

View File

@ -163,7 +163,7 @@ ngx_http_index_handler(ngx_http_request_t *r)
name = ngx_http_map_uri_to_path(r, &path, &root, reserve); name = ngx_http_map_uri_to_path(r, &path, &root, reserve);
if (name == NULL) { if (name == NULL) {
return NGX_ERROR; return NGX_HTTP_INTERNAL_SERVER_ERROR;
} }
allocated = path.data + path.len - name; allocated = path.data + path.len - name;