Will Bond hace 12 años
padre
commit
1039992735
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9
    0
      ngx_http_uploadprogress_module.c

+ 9
- 0
ngx_http_uploadprogress_module.c Ver fichero

833
     up->length = 0;
833
     up->length = 0;
834
     up->timeout = 0;
834
     up->timeout = 0;
835
 
835
 
836
+    // Properly handles small files where no read events happen after the
837
+    // request is first handled
838
+    if (r->headers_in.content_length_n) {
839
+        up->length = r->headers_in.content_length_n;
840
+        if (r->request_body) {
841
+            up->rest = r->request_body->rest;
842
+        }
843
+    }
844
+
836
     up->next = ctx->list_head.next;
845
     up->next = ctx->list_head.next;
837
     up->next->prev = up;
846
     up->next->prev = up;
838
     up->prev = &ctx->list_head;
847
     up->prev = &ctx->list_head;

Loading…
Cancelar
Guardar