Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_static_module.c @ 6987:5116cfea1e9a
Gzip static: use an appropriate error on memory allocation failure.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 20 Apr 2017 18:26:38 +0300 |
parents | 99934aade555 |
children | d26db4f82d7d |
comparison
equal
deleted
inserted
replaced
6986:0cdee26605f3 | 6987:5116cfea1e9a |
---|---|
236 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 236 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
237 } | 237 } |
238 | 238 |
239 h = ngx_list_push(&r->headers_out.headers); | 239 h = ngx_list_push(&r->headers_out.headers); |
240 if (h == NULL) { | 240 if (h == NULL) { |
241 return NGX_ERROR; | 241 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
242 } | 242 } |
243 | 243 |
244 h->hash = 1; | 244 h->hash = 1; |
245 ngx_str_set(&h->key, "Content-Encoding"); | 245 ngx_str_set(&h->key, "Content-Encoding"); |
246 ngx_str_set(&h->value, "gzip"); | 246 ngx_str_set(&h->value, "gzip"); |