diff options
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/modules/ngx_http_gzip_filter.c | 4 | ||||
| -rw-r--r-- | src/http/modules/proxy/ngx_http_proxy_upstream.c | 6 | ||||
| -rw-r--r-- | src/http/ngx_http_core_module.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_request.c | 16 | ||||
| -rw-r--r-- | src/http/ngx_http_request.h | 9 | ||||
| -rw-r--r-- | src/http/ngx_http_write_filter.c | 4 |
6 files changed, 17 insertions, 24 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c index 4f43f3464..eb9497517 100644 --- a/src/http/modules/ngx_http_gzip_filter.c +++ b/src/http/modules/ngx_http_gzip_filter.c @@ -435,9 +435,9 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } /* - * We preallocate a memory for zlib in one hunk (200K-400K), this + * We preallocate a memory for zlib in one buffer (200K-400K), this * dicreases a number of malloc() and free() calls and also probably - * dicreases a number of syscalls. + * dicreases a number of syscalls (sbrk() or so). * Besides we free() this memory as soon as the gzipping will complete * and do not wait while a whole response will be sent to a client. * diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c index ed25c8e11..643f7fafc 100644 --- a/src/http/modules/proxy/ngx_http_proxy_upstream.c +++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c @@ -701,7 +701,7 @@ static void ngx_http_proxy_send_request(ngx_http_proxy_ctx_t *p) /* rc == NGX_OK */ - if (c->tcp_nopush) { + if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) { if (ngx_tcp_push(c->fd) == NGX_ERROR) { ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno, @@ -710,7 +710,7 @@ static void ngx_http_proxy_send_request(ngx_http_proxy_ctx_t *p) return; } - c->tcp_nopush = 0; + c->tcp_nopush = NGX_TCP_NOPUSH_UNSET; return; } @@ -1138,7 +1138,7 @@ static void ngx_http_proxy_send_response(ngx_http_proxy_ctx_t *p) return; } - /* TODO: preallocate event_pipe hunks, look "Content-Length" */ + /* TODO: preallocate event_pipe bufs, look "Content-Length" */ rc = ngx_http_send_header(r); diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 52e4a2715..aeec7d21c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -567,7 +567,7 @@ int ngx_http_find_location_config(ngx_http_request_t *r) if (!clcf->tcp_nopush) { /* disable TCP_NOPUSH/TCP_CORK use */ - r->connection->tcp_nopush = -1; + r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; } diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 9487d0692..97e1b9439 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -92,7 +92,7 @@ void ngx_http_init_connection(ngx_connection_t *c) if (rev->ready) { /* deferred accept, aio, iocp */ - if (*ngx_accept_mutex) { + if (ngx_accept_mutex) { if (ngx_mutex_lock(ngx_posted_events_mutex) == NGX_ERROR) { ngx_http_close_connection(c); return; @@ -562,10 +562,10 @@ static void ngx_http_process_request_line(ngx_event_t *rev) /* * If it's a pipelined request and a request line is not complete - * then we have to copy it to the start of the r->header_in hunk. + * then we have to copy it to the start of the r->header_in buf. * We have to copy it here only if the large client headers * are enabled otherwise a request line had been already copied - * to the start of the r->header_in hunk in ngx_http_set_keepalive(). + * to the start of the r->header_in buf in ngx_http_set_keepalive(). */ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); @@ -757,8 +757,10 @@ static void ngx_http_process_request_headers(ngx_event_t *rev) if (r->header_in->last == r->header_in->end) { - /* if the large client headers are enabled then - we need to compact r->header_in hunk */ + /* + * if the large client headers are enabled then + * we need to compact r->header_in buf + */ if (cscf->large_client_header) { offset = r->header_name_start - r->header_in->start; @@ -1315,13 +1317,13 @@ static void ngx_http_set_keepalive(ngx_http_request_t *r) ctx->action = "keepalive"; - if (c->tcp_nopush == 1) { + if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) { if (ngx_tcp_push(c->fd) == NGX_ERROR) { ngx_connection_error(c, ngx_socket_errno, ngx_tcp_push_n " failed"); ngx_http_close_connection(c); return; } - c->tcp_nopush = 0; + c->tcp_nopush = NGX_TCP_NOPUSH_UNSET; } if (rev->ready) { diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 77cabb5bd..cac8aed37 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -223,15 +223,6 @@ struct ngx_http_request_s { ngx_http_request_body_t *request_body; -#if 0 - ngx_temp_file_t *temp_file; - ngx_chain_t *request_hunks; - ngx_hunk_t *request_body_hunk; - size_t remaining_body_len; - void (*request_body_handler) (void *data); - void *data; -#endif - time_t lingering_time; ngx_uint_t method; diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index e23649e32..48aba4373 100644 --- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c @@ -129,8 +129,8 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) ngx_http_write_filter_module); /* - * avoid the output if there is no last hunk, no flush point, - * there are the incoming hunks and the size of all hunks + * avoid the output if there is no last buf, no flush point, + * there are the incoming bufs and the size of all bufs * is smaller than "postpone_output" directive */ |
