diff src/http/ngx_http_upstream.c @ 410:a8e3f1441eec NGINX_0_7_17

nginx 0.7.17 *) Feature: now the "directio" directive works on Linux. *) Feature: the $pid variable. *) Bugfix: the "directio" optimization that had appeared in 0.7.15 did not work with open_file_cache. *) Bugfix: the "access_log" with variables did not work on Linux; the bug had appeared in 0.7.7. *) Bugfix: the ngx_http_charset_module did not understand quoted charset name received from backend.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Sep 2008 00:00:00 +0400
parents 9d81578d04bb
children b246022ef454
line wrap: on
line diff
--- 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_
 
         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;