]> git.kaiwu.me - nginx.git/commitdiff
fix r2122:
authorIgor Sysoev <igor@sysoev.ru>
Thu, 2 Oct 2008 15:38:26 +0000 (15:38 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 2 Oct 2008 15:38:26 +0000 (15:38 +0000)
*) update file buf pointers,
*) avoid "zero buf" alert

src/http/modules/ngx_http_range_filter_module.c

index 377ca9b280507386704833ecc4f16e78727bb283..4a15637f589783e8a6694f407aa4c222e45bcfce 100644 (file)
@@ -654,7 +654,13 @@ ngx_http_range_singlepart_body(ngx_http_request_t *r,
             ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                            "http range body skip");
 
+            if (buf->in_file) {
+                buf->file_pos = buf->file_last;
+            }
+
             buf->pos = buf->last;
+            buf->sync = 1;
+
             continue;
         }