aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_gzip_static_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_gzip_static_module.c')
-rw-r--r--src/http/modules/ngx_http_gzip_static_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c
index b0183e0aa..da359766d 100644
--- a/src/http/modules/ngx_http_gzip_static_module.c
+++ b/src/http/modules/ngx_http_gzip_static_module.c
@@ -207,6 +207,10 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r)
r->headers_out.content_length_n = of.size;
r->headers_out.last_modified_time = of.mtime;
+ if (ngx_http_set_etag(r) != NGX_OK) {
+ return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ }
+
if (ngx_http_set_content_type(r) != NGX_OK) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}