Mercurial > hg > nginx
diff src/http/ngx_http_upstream.c @ 2244:f5a9f35e8344
strip charset name quotes
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 09 Sep 2008 11:58:45 +0000 |
parents | 274c0f3ea600 |
children | 920be89a3d2d |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Mon Sep 08 09:49:22 2008 +0000 +++ b/src/http/ngx_http_upstream.c Tue Sep 09 11:58:45 2008 +0000 @@ -2632,7 +2632,17 @@ 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;