From: Igor Sysoev Date: Sun, 4 May 2008 10:08:36 +0000 (+0000) Subject: r1969 merge: X-Git-Tag: release-0.5.36~2 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=24488a2a5aa9ec0cb59ec7f93fd1138a98119eb6;p=nginx.git r1969 merge: fix segfault --- 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; }