]> git.kaiwu.me - nginx.git/commitdiff
use content type of the parent request in SSI stub block output
authorIgor Sysoev <igor@sysoev.ru>
Fri, 19 Feb 2010 13:42:59 +0000 (13:42 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 19 Feb 2010 13:42:59 +0000 (13:42 +0000)
instead of default one

src/http/modules/ngx_http_ssi_filter_module.c

index 2520cdbe56214d70f8fa16555d3dca4d3c8c1513..d95b297baa1282de3196ef372d63f134e56e688a 100644 (file)
@@ -2061,9 +2061,9 @@ ngx_http_ssi_stub_output(ngx_http_request_t *r, void *data, ngx_int_t rc)
     out = data;
 
     if (!r->header_sent) {
-        if (ngx_http_set_content_type(r) != NGX_OK) {
-            return NGX_ERROR;
-        }
+        r->headers_out.content_type_len =
+                                      r->parent->headers_out.content_type_len;
+        r->headers_out.content_type = r->parent->headers_out.content_type;
 
         if (ngx_http_send_header(r) == NGX_ERROR) {
             return NGX_ERROR;