Mercurial > hg > nginx
changeset 5825:51fe42cc7876
Fixed ETag memory allocation error handling.
The etag->hash must be set to 0 to avoid an empty ETag header being
returned with the 500 Internal Server Error page after the memory
allocation failure.
Reported by Markus Linnala.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 08 Sep 2014 21:36:03 +0400 |
parents | e7f6991eca47 |
children | 16013b71feed |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Mon Sep 08 21:35:53 2014 +0400 +++ b/src/http/ngx_http_core_module.c Mon Sep 08 21:36:03 2014 +0400 @@ -1837,6 +1837,7 @@ etag->value.data = ngx_pnalloc(r->pool, NGX_OFF_T_LEN + NGX_TIME_T_LEN + 3); if (etag->value.data == NULL) { + etag->hash = 0; return NGX_ERROR; }