Skip to content
Browse files

Fixed compilation issue on 0.6.32

  • Loading branch information...
1 parent 5c1fbca commit 7d6e96fab9a534405d55732146edf9754a09fb6e @vkholodkov committed Jul 21, 2008
Showing with 5 additions and 4 deletions.
  1. +1 −0 Changelog
  2. +4 −4 ngx_http_upload_module.c
View
1 Changelog
@@ -7,6 +7,7 @@ Version 2.0.3
* In case of any errors at the last chunk of request body only 500 Internal Server Error
was generated intead of 400 Bad Request and 503 Service Unavailable.
* Fixed copyrights for temporary file name generation code
+ * Fixed compilation issue on 0.6.32. Thanks to Tomas Pollak.
Version 2.0.2
* Fixed crash in logging filename while aborting upload
View
8 ngx_http_upload_module.c
@@ -1003,7 +1003,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
rb->rest = r->headers_in.content_length_n - preread;
- if (rb->rest <= (size_t) (b->end - b->last)) {
+ if (rb->rest <= (off_t) (b->end - b->last)) {
/* the whole request body may be placed in r->header_in */
@@ -1027,7 +1027,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
size = clcf->client_body_buffer_size;
size += size >> 2;
- if (rb->rest < (size_t) size) {
+ if (rb->rest < (ssize_t) size) {
size = rb->rest;
if (r->request_body_in_single_buf) {
@@ -1135,8 +1135,8 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
size = rb->buf->end - rb->buf->last;
- if (size > rb->rest) {
- size = rb->rest;
+ if ((off_t)size > rb->rest) {
+ size = (size_t)rb->rest;
}
n = c->recv(c, rb->buf->last, size);

0 comments on commit 7d6e96f

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