aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_empty_gif_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_empty_gif_module.c')
-rw-r--r--src/http/modules/ngx_http_empty_gif_module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_empty_gif_module.c b/src/http/modules/ngx_http_empty_gif_module.c
index 82bf8c5e2..b97633a58 100644
--- a/src/http/modules/ngx_http_empty_gif_module.c
+++ b/src/http/modules/ngx_http_empty_gif_module.c
@@ -135,7 +135,7 @@ ngx_http_empty_gif_handler(ngx_http_request_t *r)
}
}
- b = ngx_create_temp_buf(r->pool, sizeof(ngx_empty_gif));
+ b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
if (b == NULL) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
@@ -145,6 +145,7 @@ ngx_http_empty_gif_handler(ngx_http_request_t *r)
b->pos = ngx_empty_gif;
b->last = ngx_empty_gif + sizeof(ngx_empty_gif);
+ b->memory = 1;
b->last_buf = 1;
r->headers_out.status = NGX_HTTP_OK;