]> git.kaiwu.me - nginx.git/commitdiff
Proxy: use an appropriate error on memory allocation failure.
authorRuslan Ermilov <ru@nginx.com>
Wed, 4 Mar 2015 05:12:53 +0000 (08:12 +0300)
committerRuslan Ermilov <ru@nginx.com>
Wed, 4 Mar 2015 05:12:53 +0000 (08:12 +0300)
src/http/modules/ngx_http_proxy_module.c

index d7675d46820c42e39c5c20330e5cfc15b3c7eeb1..2409c7ec44f0cce189eaaa5e571f574b4050c777 100644 (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));
     if (ctx == NULL) {
-        return NGX_ERROR;
+        return NGX_HTTP_INTERNAL_SERVER_ERROR;
     }
 
     ngx_http_set_ctx(r, ctx, ngx_http_proxy_module);