[nginx] svn commit: r4283 - trunk/src/http/modules

igor at sysoev.ru igor at sysoev.ru
Mon Nov 14 14:42:48 UTC 2011


Author: is
Date: 2011-11-14 14:42:48 +0000 (Mon, 14 Nov 2011)
New Revision: 4283

Modified:
   trunk/src/http/modules/ngx_http_mp4_module.c
Log:
Fix of "Content-Length" header of MP4 response if start argument was used.

Patch by Piotr Sikora.


Modified: trunk/src/http/modules/ngx_http_mp4_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_mp4_module.c	2011-11-14 14:16:51 UTC (rev 4282)
+++ trunk/src/http/modules/ngx_http_mp4_module.c	2011-11-14 14:42:48 UTC (rev 4283)
@@ -1066,7 +1066,6 @@
 
     atom_data_size = mp4->mdat_data.buf->file_last - start_offset;
     mp4->mdat_data.buf->file_pos = start_offset;
-    mp4->content_length += atom_data_size;
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
                    "mdat new offset @%O:%O", start_offset, atom_data_size);
@@ -1083,6 +1082,8 @@
         atom_header_size = sizeof(ngx_mp4_atom_header_t);
     }
 
+    mp4->content_length += atom_header_size + atom_data_size;
+
     ngx_mp4_set_32value(atom_header, atom_size);
     ngx_mp4_set_atom_name(atom_header, 'm', 'd', 'a', 't');
 



More information about the nginx-devel mailing list