changeset 1994:f3205008c55a stable-0.5

r1969 merge: fix segfault
author Igor Sysoev <igor@sysoev.ru>
date Sun, 04 May 2008 10:08:36 +0000
parents 778fd69806fc
children 4b54072c0848
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
@@ -2543,6 +2543,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;
         }