diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-09-09 11:58:45 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-09-09 11:58:45 +0000 |
commit | 316542508b828c787982ee0850dfde9d11238891 (patch) | |
tree | 9e7ee105c510a9ffcc1fa97d9bf6634d48eedbe8 /src | |
parent | 44b1a127505544aa750dbcd939ac5e7da44cd8ee (diff) | |
download | nginx-316542508b828c787982ee0850dfde9d11238891.tar.gz nginx-316542508b828c787982ee0850dfde9d11238891.zip |
strip charset name quotes
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index ae86b9858..6bbf872c1 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2632,7 +2632,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; |