diff src/http/modules/ngx_http_flv_module.c @ 388:6de24473fa70 NGINX_0_7_6

nginx 0.7.6 *) Bugfix: now if variables are used in the "access_log" directive a request root existence is always tested. *) Bugfix: the ngx_http_flv_module did not support several values in a query string.
author Igor Sysoev <http://sysoev.ru>
date Mon, 07 Jul 2008 00:00:00 +0400
parents 12defd37f578
children 0b6053502c55
line wrap: on
line diff
--- a/src/http/modules/ngx_http_flv_module.c
+++ b/src/http/modules/ngx_http_flv_module.c
@@ -60,7 +60,7 @@ ngx_module_t  ngx_http_flv_module = {
 static ngx_int_t
 ngx_http_flv_handler(ngx_http_request_t *r)
 {
-    u_char                    *p, *last;
+    u_char                    *p, *n, *last;
     off_t                      start, len;
     size_t                     root;
     ngx_int_t                  rc;
@@ -159,6 +159,8 @@ ngx_http_flv_handler(ngx_http_request_t 
         return NGX_DECLINED;
     }
 
+    r->root_tested = 1;
+
     start = 0;
     len = of.size;
     i = 1;
@@ -169,7 +171,13 @@ ngx_http_flv_handler(ngx_http_request_t 
         if (p) {
             p += 6;
 
-            start = ngx_atoof(p, r->args.len - (p - r->args.data));
+            for (n = p; n < r->args.data + r->args.len; n++) {
+                if (*n == '&') {
+                    break;
+                }
+            }
+
+            start = ngx_atoof(p, n - p);
 
             if (start == NGX_ERROR || start >= len) {
                 start = 0;