diff options
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/ngx_http.c | 3 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.h | 8 | ||||
| -rw-r--r-- | src/http/ngx_http_event.c | 5 | ||||
| -rw-r--r-- | src/http/ngx_http_output_filter.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 005f230fb..10f002311 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -513,7 +513,8 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) /* prepare for the next cycle */ - (char *) in_port[p].addrs.elts += in_port[p].addrs.size; + in_port[p].addrs.elts = (char *) in_port[p].addrs.elts + + in_port[p].addrs.size; in_port[p].addrs.nelts--; in_addr = (ngx_http_in_addr_t *) in_port[p].addrs.elts; diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 4cf966a1d..df9bcca02 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -35,9 +35,9 @@ typedef struct { ngx_msec_t post_accept_timeout; ssize_t connection_pool_size; - size_t request_pool_size; + ssize_t request_pool_size; ngx_msec_t client_header_timeout; - size_t client_header_buffer_size; + ssize_t client_header_buffer_size; int large_client_header; } ngx_http_core_srv_conf_t; @@ -99,8 +99,8 @@ typedef struct { int sendfile; /* sendfile */ ngx_msec_t send_timeout; /* send_timeout */ - size_t send_lowat; /* send_lowat */ - size_t discarded_buffer_size; /* discarded_buffer_size */ + ssize_t send_lowat; /* send_lowat */ + ssize_t discarded_buffer_size; /* discarded_buffer_size */ ngx_msec_t keepalive_timeout; /* keepalive_timeout */ ngx_msec_t lingering_time; /* lingering_time */ ngx_msec_t lingering_timeout; /* lingering_timeout */ diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c index 991b87d3b..06a98a372 100644 --- a/src/http/ngx_http_event.c +++ b/src/http/ngx_http_event.c @@ -1035,8 +1035,7 @@ static void ngx_http_read_discarded_body_event(ngx_event_t *rev) static int ngx_http_read_discarded_body(ngx_http_request_t *r) { - size_t size; - ssize_t n; + ssize_t size, n; ngx_http_core_loc_conf_t *clcf; ngx_log_debug(r->connection->log, "http read discarded body"); @@ -1318,7 +1317,7 @@ static void ngx_http_lingering_close_handler(ngx_event_t *rev) or the end of parsed header (otherwise) instead of r->header_in->last */ - if ((size_t)(r->header_in->end - r->header_in->last) + if (r->header_in->end - r->header_in->last >= clcf->discarded_buffer_size) { r->discarded_buffer = r->header_in->last; diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c index 7ee6a9673..09b7bfab5 100644 --- a/src/http/ngx_http_output_filter.c +++ b/src/http/ngx_http_output_filter.c @@ -69,7 +69,7 @@ ngx_module_t ngx_http_output_filter_module = { int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk) { int rc; - size_t size; + ssize_t size; ngx_chain_t *ce, *le; ngx_http_output_filter_ctx_t *ctx; ngx_http_output_filter_conf_t *conf; |
