--- src/http/ngx_http_core_module.c	Thu Sep  8 11:41:55 2005
+++ src/http/ngx_http_core_module.c	Tue Jan 24 14:42:44 2006
@@ -810,6 +810,11 @@
     ngx_http_type_t           *type;
     ngx_http_core_loc_conf_t  *clcf;
 
+    if(r->upstream->headers_in.x_accel_redirect && r->upstream->headers_in.content_type) {
+        r->headers_out.content_type = r->upstream->headers_in.content_type->value;
+        return NGX_OK;
+    }
+
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
     if (r->exten.len) {
