]> git.kaiwu.me - nginx.git/commitdiff
fix segfault
authorIgor Sysoev <igor@sysoev.ru>
Fri, 11 Apr 2008 09:15:07 +0000 (09:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 11 Apr 2008 09:15:07 +0000 (09:15 +0000)
src/http/ngx_http_upstream.c

index ed280a8c9a114c399f213143bae479d82e918367..e0aefed6f3051bdccb1845a890ce6fec17fe080d 100644 (file)
@@ -2613,6 +2613,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;
         }