Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save newbamboo/3052 to your computer and use it in GitHub Desktop.
Save newbamboo/3052 to your computer and use it in GitHub Desktop.
diff -Naur nginx_uploadprogress_module/ngx_http_uploadprogress_module.c nginx_uploadprogress_module_safari_fix/ngx_http_uploadprogress_module.c
--- nginx_uploadprogress_module/ngx_http_uploadprogress_module.c 2007-10-10 11:42:17.000000000 +0000
+++ nginx_uploadprogress_module_safari_fix/ngx_http_uploadprogress_module.c 2008-02-29 14:24:49.000000000 +0000
@@ -7,6 +7,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
+#include <ctype.h>
#define TIMER_FREQUENCY 15 * 1000
@@ -113,12 +114,12 @@
NGX_MODULE_V1_PADDING
};
-static ngx_str_t x_progress_id = ngx_string("X-Progress-ID");
+static ngx_str_t x_progress_id = ngx_string("X-PROGRESS-ID");
static ngx_str_t*
get_tracking_id(ngx_http_request_t * r)
{
- u_char *p, *start_p;
+ u_char *p, *start_p, *hp;
ngx_uint_t i;
ngx_list_part_t *part;
ngx_table_elt_t *header;
@@ -139,6 +140,10 @@
i = 0;
}
+ /* Make header match case-insensitive */
+ hp = header[i].key.data;
+ while(*hp) { *hp=toupper(*hp); hp++; }
+
if (header[i].key.len == x_progress_id.len
&& ngx_strncmp(header[i].key.data, x_progress_id.data,
header[i].key.len) == 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment