aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-11-20 17:18:12 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-11-20 17:18:12 +0000
commit6a01020f93507daacc186e1ec3b3e6a1f9439fdd (patch)
tree047bdc572f2623a3fd9073c3fc53e92311ab3e2a
parentabb54176a2e3ffd84fcbb50735dcb14b3c97f389 (diff)
downloadnginx-6a01020f93507daacc186e1ec3b3e6a1f9439fdd.tar.gz
nginx-6a01020f93507daacc186e1ec3b3e6a1f9439fdd.zip
r2245 merge:
strip charset name quotes
-rw-r--r--src/http/ngx_http_upstream.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 9ec861cfa..b18bf477f 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2625,7 +2625,17 @@ ngx_http_upstream_copy_content_type(ngx_http_request_t *r, ngx_table_elt_t *h,
r->headers_out.content_type_len = last - h->value.data;
- r->headers_out.charset.len = h->value.data + h->value.len - p;
+ if (*p == '"') {
+ p++;
+ }
+
+ last = h->value.data + h->value.len;
+
+ if (*(last - 1) == '"') {
+ last--;
+ }
+
+ r->headers_out.charset.len = last - p;
r->headers_out.charset.data = p;
return NGX_OK;