Proxy: use an appropriate error on memory allocation failure.

This commit is contained in:
Ruslan Ermilov 2015-03-04 08:12:53 +03:00
parent c238150a57
commit 5e5540f7dc

View File

@ -812,7 +812,7 @@ ngx_http_proxy_handler(ngx_http_request_t *r)
ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t)); ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t));
if (ctx == NULL) { if (ctx == NULL) {
return NGX_ERROR; return NGX_HTTP_INTERNAL_SERVER_ERROR;
} }
ngx_http_set_ctx(r, ctx, ngx_http_proxy_module); ngx_http_set_ctx(r, ctx, ngx_http_proxy_module);