Permalink
Browse files

Merge branch 'bigplum-2.2' into 2.2

  • Loading branch information...
2 parents 3ae6a38 + ccbe8f1 commit 8d271b1b211dba6481986eb1ad80d71ecaf7b4b4 Valery Kholodkov committed Apr 23, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 ngx_http_upload_module.c
View
@@ -3478,6 +3478,14 @@ static ngx_int_t upload_parse_request_headers(ngx_http_upload_ctx_t *upload_ctx,
return NGX_HTTP_REQUEST_ENTITY_TOO_LARGE;
}
+ if( (upload_ctx->content_range_n.end - upload_ctx->content_range_n.start + 1)
+ != headers_in->content_length_n)
+ {
+ ngx_log_error(NGX_LOG_ERR, upload_ctx->log, 0,
+ "range length is not equal to content length");
+ return NGX_HTTP_RANGE_NOT_SATISFIABLE;
+ }
+
upload_ctx->partial_content = 1;
}
}

0 comments on commit 8d271b1

Please sign in to comment.