File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Version 2.0.3
7
7
* In case of any errors at the last chunk of request body only 500 Internal Server Error
8
8
was generated intead of 400 Bad Request and 503 Service Unavailable.
9
9
* Fixed copyrights for temporary file name generation code
10
+ * Fixed compilation issue on 0.6.32. Thanks to Tomas Pollak.
10
11
11
12
Version 2.0.2
12
13
* Fixed crash in logging filename while aborting upload
Original file line number Diff line number Diff line change @@ -1003,7 +1003,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
1003
1003
1004
1004
rb -> rest = r -> headers_in .content_length_n - preread ;
1005
1005
1006
- if (rb -> rest <= (size_t ) (b -> end - b -> last )) {
1006
+ if (rb -> rest <= (off_t ) (b -> end - b -> last )) {
1007
1007
1008
1008
/* the whole request body may be placed in r->header_in */
1009
1009
@@ -1027,7 +1027,7 @@ ngx_http_read_upload_client_request_body(ngx_http_request_t *r) {
1027
1027
size = clcf -> client_body_buffer_size ;
1028
1028
size += size >> 2 ;
1029
1029
1030
- if (rb -> rest < (size_t ) size ) {
1030
+ if (rb -> rest < (ssize_t ) size ) {
1031
1031
size = rb -> rest ;
1032
1032
1033
1033
if (r -> request_body_in_single_buf ) {
@@ -1135,8 +1135,8 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
1135
1135
1136
1136
size = rb -> buf -> end - rb -> buf -> last ;
1137
1137
1138
- if (size > rb -> rest ) {
1139
- size = rb -> rest ;
1138
+ if (( off_t ) size > rb -> rest ) {
1139
+ size = ( size_t ) rb -> rest ;
1140
1140
}
1141
1141
1142
1142
n = c -> recv (c , rb -> buf -> last , size );
You can’t perform that action at this time.
0 commit comments