changeset 9:4206defe5590

Clear Content-Length header if it's here.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 15 Jul 2008 06:22:13 +0400
parents 60d65f2acaed
children 42975d951e9f
files ngx_http_bytes_filter_module.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ngx_http_bytes_filter_module.c	Tue Jul 15 06:20:32 2008 +0400
+++ b/ngx_http_bytes_filter_module.c	Tue Jul 15 06:22:13 2008 +0400
@@ -269,6 +269,11 @@
 done:
     r->headers_out.content_length_n = len;
 
+    if (r->headers_out.content_length) {
+        r->headers_out.content_length->hash = 0;
+        r->headers_out.content_length = NULL;
+    }
+
     ngx_http_set_ctx(r, ctx, ngx_http_bytes_filter_module);
 
     ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,