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.
This commit is contained in:
Maxim Dounin 2012-07-09 17:04:37 +00:00
parent 1b77858ac5
commit e3acbc6bbb

View File

@ -179,7 +179,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r)
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;