comparison src/http/modules/ngx_http_mp4_module.c @ 6722:6136a51f9c21

Do not set last_buf flag in subrequests. The last_buf flag should only be set in the last buffer of the main request. Otherwise, several last_buf flags can appear in output. This can, for example, break the chunked filter, which will include several final chunks in output.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 03 Oct 2016 20:48:51 +0300
parents 293413010217
children b123eae3fd4e
comparison
equal deleted inserted replaced
6721:48bab8b83f4e 6722:6136a51f9c21
1142 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "mp4 mdat atom"); 1142 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "mp4 mdat atom");
1143 1143
1144 data = &mp4->mdat_data_buf; 1144 data = &mp4->mdat_data_buf;
1145 data->file = &mp4->file; 1145 data->file = &mp4->file;
1146 data->in_file = 1; 1146 data->in_file = 1;
1147 data->last_buf = 1; 1147 data->last_buf = (mp4->request == mp4->request->main) ? 1 : 0;
1148 data->last_in_chain = 1; 1148 data->last_in_chain = 1;
1149 data->file_last = mp4->offset + atom_data_size; 1149 data->file_last = mp4->offset + atom_data_size;
1150 1150
1151 mp4->mdat_atom.buf = &mp4->mdat_atom_buf; 1151 mp4->mdat_atom.buf = &mp4->mdat_atom_buf;
1152 mp4->mdat_atom.next = &mp4->mdat_data; 1152 mp4->mdat_atom.next = &mp4->mdat_data;