diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-07-09 00:13:06 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-07-09 00:13:06 +0000 |
| commit | eb7c38a49ae11d9084969790f0b86d75cc1f11c7 (patch) | |
| tree | 592bdb9feb92670a494759682153ee6a8eec4de4 /src/http/modules | |
| parent | 8b00c87c385ce1b3d231cbafff2bb431acec0953 (diff) | |
| download | nginx-eb7c38a49ae11d9084969790f0b86d75cc1f11c7.tar.gz nginx-eb7c38a49ae11d9084969790f0b86d75cc1f11c7.tar.bz2 | |
Entity tags: set for static respones.
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_flv_module.c | 4 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_gzip_static_module.c | 4 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_mp4_module.c | 4 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_static_module.c | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c index 03a746803..cc2532027 100644 --- a/src/http/modules/ngx_http_flv_module.c +++ b/src/http/modules/ngx_http_flv_module.c @@ -194,6 +194,10 @@ ngx_http_flv_handler(ngx_http_request_t *r) r->headers_out.content_length_n = len; 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; } 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; } diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c index d3be23420..a216c87ef 100644 --- a/src/http/modules/ngx_http_mp4_module.c +++ b/src/http/modules/ngx_http_mp4_module.c @@ -586,6 +586,10 @@ ngx_http_mp4_handler(ngx_http_request_t *r) r->headers_out.status = NGX_HTTP_OK; 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; } diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index 9d77e43b1..631eb17b2 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -220,6 +220,10 @@ ngx_http_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; } |
