diff src/http/modules/ngx_http_range_filter_module.c @ 300:cba14c1e2a4b NGINX_0_5_20

nginx 0.5.20 *) Feature: the "sendfile_max_chunk" directive. *) Feature: the "$http_...", "$sent_http_...", and "$upstream_http_..." variables may be changed using the "set" directive. *) Bugfix: a segmentation fault might occur in worker process if the SSI command 'if expr="$var = /"' was used. *) Bugfix: trailing boundary of multipart range response was transferred incorrectly. Thanks to Evan Miller. *) Bugfix: nginx did not work on Solaris/sparc64 if it was built by Sun Studio. Thanks to Andrei Nigmatulin. *) Bugfix: the ngx_http_perl_module could not built by Solaris make. Thanks to Andrei Nigmatulin.
author Igor Sysoev <http://sysoev.ru>
date Mon, 07 May 2007 00:00:00 +0400
parents 5bef04fc3fd5
children c60beecc6ab5
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;