Bläddra i källkod

Fixed bug in interaction with upload module

tags/v0.7
Valery Kholodkov 17 år sedan
förälder
incheckning
dd8cedcdc3
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2
    1
      ngx_http_uploadprogress_module.c

+ 2
- 1
ngx_http_uploadprogress_module.c Visa fil

@@ -429,7 +429,8 @@ static void ngx_http_uploadprogress_event_handler(ngx_http_request_t *r)
429 429
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
430 430
                        "upload-progress: read_event_handler found node: %V", id);
431 431
         up->rest = r->request_body->rest;
432
-        up->length = r->headers_in.content_length_n;
432
+        if(up->length == 0)
433
+            up->length = r->headers_in.content_length_n;
433 434
         ngx_log_debug3(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
434 435
                        "upload-progress: read_event_handler storing rest %uO/%uO for %V", up->rest, up->length, id);
435 436
     } else {

Laddar…
Avbryt
Spara