Browse Source

Make session ID query-string parameter name also configurable

tags/v0.8.2
Pierre-Yves Kerembellec 15 years ago
parent
commit
38e44260b1
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      ngx_http_uploadprogress_module.c

+ 3
- 2
ngx_http_uploadprogress_module.c View File

@@ -313,7 +313,8 @@ get_tracking_id(ngx_http_request_t * r)
313 313
         p = args.data;
314 314
         do {
315 315
             ngx_uint_t len = args.len - (p - args.data);
316
-            if (len >= 14 && ngx_strncasecmp(p, (u_char*)"X-Progress-ID=", 14) == 0) {
316
+            if (len >= (upcf->header.len + 1) && ngx_strncasecmp(p, upcf->header.data, upcf->header.len) == 0
317
+                && p[upcf->header.len] == '=') {
317 318
               ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
318 319
                              "upload-progress: get_tracking_id found args: %s",p);
319 320
                 i = 1;
@@ -325,7 +326,7 @@ get_tracking_id(ngx_http_request_t * r)
325 326
         while(p++);
326 327
 
327 328
         if (i) {
328
-            start_p = p += 14;
329
+            start_p = p += upcf->header.len + 1;
329 330
             while (p < args.data + args.len) {
330 331
                 if (*((p++) + 1) == '&') {
331 332
                     break;

Loading…
Cancel
Save