changeset 4750:149634c98d67

Entity tags: empty etags handling in If-Range. Entity tag may be of length 2 as per RFC 2616, i.e. double quotes only. Pointed out by Ruslan Ermilov.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 09 Jul 2012 17:04:37 +0000
parents 613750237b36
children 2c5e1e88c8cf
files src/http/modules/ngx_http_range_filter_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -179,7 +179,7 @@ ngx_http_range_header_filter(ngx_http_re
 
         if_range = &r->headers_in.if_range->value;
 
-        if (if_range->len > 2 && if_range->data[if_range->len - 1] == '"') {
+        if (if_range->len >= 2 && if_range->data[if_range->len - 1] == '"') {
 
             if (r->headers_out.etag == NULL) {
                 goto next_filter;