summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-05-04 10:08:36 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-05-04 10:08:36 +0000
commit24488a2a5aa9ec0cb59ec7f93fd1138a98119eb6 (patch)
treed61b76324043dddcd95ab948040feb3079a2b7d3
parent5256bf19157407a5a7d71f61d17e6b390b1d920f (diff)
downloadnginx-24488a2a5aa9ec0cb59ec7f93fd1138a98119eb6.tar.gz
r1969 merge:
fix segfault
-rw-r--r--src/http/ngx_http_upstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index e430d1a0e..08f81013e 100644
--- 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_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;
}