Skip to content
This repository
Browse code

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...
commit 788ba0864e8c78f070de44f216ec3555af67132e 1 parent d106b92
Vojta Drbohlav vojtad authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 ngx_http_upload_module.c
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)
4005 4005 return NGX_ERROR;
4006 4006 }
4007 4007
4008   - if(range_n->start >= range_n->end || range_n->start >= range_n->total
4009   - || range_n->end > range_n->total)
  4008 + if(range_n->start > range_n->end || range_n->start >= range_n->total
  4009 + || range_n->end >= range_n->total)
4010 4010 {
4011 4011 return NGX_ERROR;
4012 4012 }

0 comments on commit 788ba08

Please sign in to comment.
Something went wrong with that request. Please try again.