Преглед изворни кода

Fixed bug in interaction with upload module

tags/v0.7
Valery Kholodkov пре 17 година
родитељ
комит
dd8cedcdc3
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2
    1
      ngx_http_uploadprogress_module.c

+ 2
- 1
ngx_http_uploadprogress_module.c Прегледај датотеку

429
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
429
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
430
                        "upload-progress: read_event_handler found node: %V", id);
430
                        "upload-progress: read_event_handler found node: %V", id);
431
         up->rest = r->request_body->rest;
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
         ngx_log_debug3(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
434
         ngx_log_debug3(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
434
                        "upload-progress: read_event_handler storing rest %uO/%uO for %V", up->rest, up->length, id);
435
                        "upload-progress: read_event_handler storing rest %uO/%uO for %V", up->rest, up->length, id);
435
     } else {
436
     } else {

Loading…
Откажи
Сачувај