changeset 1968:3c540ad3021f

fix segfault
author Igor Sysoev <igor@sysoev.ru>
date Fri, 11 Apr 2008 09:15:07 +0000
parents 4a4b15c9c474
children 41fd9a2e0755
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2613,6 +2613,10 @@ ngx_http_upstream_copy_content_type(ngx_
 
         while (*++p == ' ') { /* void */ }
 
+        if (*p == '\0') {
+            return NGX_OK;
+        }
+
         if (ngx_strncasecmp(p, (u_char *) "charset=", 8) != 0) {
             continue;
         }