Klaus Demo nginx / f3ae6a6
Using strtod() instead of atofp() to support a lot of digits after dot in "start" parameter value. Igor Sysoev 10 years ago
1 changed file(s) with 10 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
498498
499499 if (ngx_http_arg(r, (u_char *) "start", 5, &value) == NGX_OK) {
500500
501 start = ngx_atofp(value.data, value.len, 3);
502
503 if (start != NGX_ERROR) {
501 /*
502 * A Flash player may send start value with a lot of digits
503 * after dot so strtod() is used instead of atofp(). NaNs and
504 * infinities become negative numbers after (int) conversion.
505 */
506
507 ngx_set_errno(0);
508 start = (int) (strtod((char *) value.data, NULL) * 1000);
509
510 if (ngx_errno == 0 && start >= 0) {
504511 r->allow_ranges = 0;
505512
506513 mp4 = ngx_pcalloc(r->pool, sizeof(ngx_http_mp4_file_t));