Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 6003:cf2f8d91cf09
Proxy: use an appropriate error on memory allocation failure.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 04 Mar 2015 08:12:53 +0300 |
parents | 610832763648 |
children | 613b14b305c7 |
comparison
equal
deleted
inserted
replaced
6002:f8ee988cfe6d | 6003:cf2f8d91cf09 |
---|---|
810 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 810 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
811 } | 811 } |
812 | 812 |
813 ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t)); | 813 ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_proxy_ctx_t)); |
814 if (ctx == NULL) { | 814 if (ctx == NULL) { |
815 return NGX_ERROR; | 815 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
816 } | 816 } |
817 | 817 |
818 ngx_http_set_ctx(r, ctx, ngx_http_proxy_module); | 818 ngx_http_set_ctx(r, ctx, ngx_http_proxy_module); |
819 | 819 |
820 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); | 820 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); |