Changes between Initial Version and Version 1 of Ticket #1228, comment 2


Ignore:
Timestamp:
03/30/17 11:26:51 (8 years ago)
Author:
zhaiyan0011@…

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1228, comment 2

    initial v1  
    66Our server requires speed limits. We have tried to fix this problem by modifying the ngx_http_slice_module module code, which now appears to be effective.
    77But we're looking for an official fix, thank you!
     8
     9ngx_http_slice_filter_module.c:
     10
     11@@ -105,6 +105,9 @@
     12     ngx_http_slice_ctx_t            *ctx;
     13     ngx_http_slice_loc_conf_t       *slcf;
     14     ngx_http_slice_content_range_t   cr;
     15+    /* get parent request */
     16+    ngx_http_request_t              *pr = r->parent ;
     17 
     18     ctx = ngx_http_get_module_ctx(r, ngx_http_slice_filter_module);
     19     if (ctx == NULL) {
     20@@ -184,6 +187,14 @@
     21     rc = ngx_http_next_header_filter(r);
     22 
     23     if (r != r->main) {
     24+   
     25+        if( pr->connection->write->delayed ) {
     26+           
     27+            if (pr->connection->write->timedout && pr->connection->write->ready ) {
     28+               
     29+                ngx_add_timer(pr->connection->write, 0);
     30+            }
     31+        }
     32         return rc;
     33     }