# HG changeset patch # User Igor Sysoev # Date 1207905307 0 # Node ID 3c540ad3021fc83c0982ef2d77f592a4b08b5e58 # Parent 4a4b15c9c474364bbabdc6955c5640ba1e7c2956 fix segfault diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- 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; }