From 5b1cf0d91fa77eaef608cd04f929892bd9aa7b1a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 6 May 2007 18:15:32 +0000 Subject: [PATCH] fix multipart ranges trailing --- src/http/modules/ngx_http_range_filter_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c index 62b537fb0..11da43d92 100644 --- 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_request_t *r, ngx_chain_t *in) 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;