Browse Source

Fix #7 - Error upload might be deleted from rbtree

Due to the done flag not being correctly set to 0 when the error
tracker triggers, it could happen that such upload could be mistakenly
removed from the the rbtree that contains all in-flight uploads.
Thanks to Theo Cushion for finding this issue.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
tags/v0.8.3
Brice Figureau 15 years ago
parent
commit
3d8e1050ba
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      ngx_http_uploadprogress_module.c

+ 5
- 0
ngx_http_uploadprogress_module.c View File

@@ -1165,6 +1165,11 @@ ngx_http_uploadprogress_errortracker(ngx_http_request_t * r)
1165 1165
         node->key = hash;
1166 1166
         up->len = (u_char) id->len;
1167 1167
         up->err_status = r->err_status;
1168
+        up->done = 0;
1169
+        up->rest = 0;
1170
+        up->length = 0;
1171
+        up->timeout = 0;
1172
+
1168 1173
         ngx_memcpy(up->data, id->data, id->len);
1169 1174
 
1170 1175
         up->next = ctx->list_head.next;

Loading…
Cancel
Save