]> git.kaiwu.me - nginx.git/commitdiff
r1969 merge:
authorIgor Sysoev <igor@sysoev.ru>
Sun, 4 May 2008 10:08:36 +0000 (10:08 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 4 May 2008 10:08:36 +0000 (10:08 +0000)
fix segfault

src/http/ngx_http_upstream.c

index e430d1a0e6151d7c89a06f4a2b4497e051dd40a1..08f81013e3db2cac488ad11394ec4b8553bdf3a1 100644 (file)
@@ -2543,6 +2543,10 @@ ngx_http_upstream_copy_content_type(ngx_http_request_t *r, ngx_table_elt_t *h,
 
         while (*++p == ' ') { /* void */ }
 
+        if (*p == '\0') {
+            return NGX_OK;
+        }
+
         if (ngx_strncasecmp(p, (u_char *) "charset=", 8) != 0) {
             continue;
         }