]> git.kaiwu.me - nginx.git/commitdiff
fix segfault
authorIgor Sysoev <igor@sysoev.ru>
Tue, 9 Jan 2007 22:04:40 +0000 (22:04 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 9 Jan 2007 22:04:40 +0000 (22:04 +0000)
src/http/modules/ngx_http_addition_filter_module.c

index c05aefde495713ea87fadc6c0bd939591bf887f9..5025f564973e2aa68b866dfcebcae76d8d493cb3 100644 (file)
@@ -87,7 +87,10 @@ ngx_http_addition_header_filter(ngx_http_request_t *r)
     ngx_http_addition_ctx_t   *ctx;
     ngx_http_addition_conf_t  *conf;
 
-    if (r->headers_out.status != NGX_HTTP_OK || r != r->main) {
+    if (r->headers_out.status != NGX_HTTP_OK
+        || r != r->main
+        || r->headers_out.content_type.data == NULL)
+    {
         return ngx_http_next_header_filter(r);
     }