changeset 1195:4ba6df5d5b53

fix multipart ranges trailing
author Igor Sysoev <igor@sysoev.ru>
date Sun, 06 May 2007 18:15:32 +0000
parents 8ea6caa62c89
children 67077918b965
files src/http/modules/ngx_http_range_filter_module.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_range_filter_module.c
+++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -636,7 +636,8 @@ ngx_http_range_body_filter(ngx_http_requ
         return NGX_ERROR;
     }
 
-    b->last = ngx_cpymem(b->pos, ctx->boundary_header.data, 4 + 10);
+    b->last = ngx_cpymem(b->pos, ctx->boundary_header.data,
+                         sizeof(CRLF "--") - 1 + NGX_ATOMIC_T_LEN);
     *b->last++ = '-'; *b->last++ = '-';
     *b->last++ = CR; *b->last++ = LF;