# HG changeset patch # User Ruslan Ermilov # Date 1425445973 -10800 # Node ID cf2f8d91cf091dc93b610d4be448f44123361274 # Parent f8ee988cfe6d6939bcd4156f0065f8cb78c8b26e Proxy: use an appropriate error on memory allocation failure. diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -812,7 +812,7 @@ ngx_http_proxy_handler(ngx_http_request_ ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t)); if (ctx == NULL) { - return NGX_ERROR; + return NGX_HTTP_INTERNAL_SERVER_ERROR; } ngx_http_set_ctx(r, ctx, ngx_http_proxy_module);