aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-08-30 14:25:35 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-08-30 14:25:35 +0000
commit1f3280bae2b3a3e70471d382bdfa13a06a53eae0 (patch)
tree9bbb44bcece88c9133ee8b95253e95bc6b9183a3 /src
parente766153451aec9b5cb6790805ed6ad6403d9ce9d (diff)
downloadnginx-1f3280bae2b3a3e70471d382bdfa13a06a53eae0.tar.gz
nginx-1f3280bae2b3a3e70471d382bdfa13a06a53eae0.zip
Unsatisfiable range with start value greater than content length
was not properly skipped. The bug has been introduced in r4057.
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_range_filter_module.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c
index 57a502536..55a37d416 100644
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -264,10 +264,6 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx)
return NGX_HTTP_RANGE_NOT_SATISFIABLE;
}
- if (start >= content_length) {
- goto skip;
- }
-
while (*p == ' ') { p++; }
if (*p == ',' || *p == '\0') {
@@ -299,7 +295,7 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx)
end = content_length - 1;
}
- if (start > end) {
+ if (start >= content_length || start > end) {
goto skip;
}