Permalink
Browse files

Fixed Content-Range parsing.

Start can be equal to end when sending one byte range and end cannot be equal to total.
  • Loading branch information...
1 parent d106b92 commit 788ba0864e8c78f070de44f216ec3555af67132e @vojtad vojtad committed Sep 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ngx_http_upload_module.c
View
4 ngx_http_upload_module.c
@@ -4005,8 +4005,8 @@ ngx_http_upload_parse_range(ngx_str_t *range, ngx_http_upload_range_t *range_n)
return NGX_ERROR;
}
- if(range_n->start >= range_n->end || range_n->start >= range_n->total
- || range_n->end > range_n->total)
+ if(range_n->start > range_n->end || range_n->start >= range_n->total
+ || range_n->end >= range_n->total)
{
return NGX_ERROR;
}

0 comments on commit 788ba08

Please sign in to comment.