Mercurial > hg > nginx
comparison src/http/modules/ngx_http_flv_module.c @ 2122:d090fa684433
allow range for partial flv response
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 29 Jul 2008 13:58:56 +0000 |
parents | c8039b26a949 |
children | 25add486e7aa |
comparison
equal
deleted
inserted
replaced
2121:b39c0040b3e4 | 2122:d090fa684433 |
---|---|
210 b->last = ngx_flv_header + sizeof(ngx_flv_header) - 1; | 210 b->last = ngx_flv_header + sizeof(ngx_flv_header) - 1; |
211 b->memory = 1; | 211 b->memory = 1; |
212 | 212 |
213 out[0].buf = b; | 213 out[0].buf = b; |
214 out[0].next = &out[1]; | 214 out[0].next = &out[1]; |
215 | |
216 } else { | |
217 r->allow_ranges = 1; | |
218 } | 215 } |
219 | 216 |
220 | 217 |
221 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 218 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); |
222 if (b == NULL) { | 219 if (b == NULL) { |
225 | 222 |
226 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); | 223 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); |
227 if (b->file == NULL) { | 224 if (b->file == NULL) { |
228 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 225 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
229 } | 226 } |
227 | |
228 r->allow_ranges = 1; | |
230 | 229 |
231 rc = ngx_http_send_header(r); | 230 rc = ngx_http_send_header(r); |
232 | 231 |
233 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | 232 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { |
234 return rc; | 233 return rc; |