Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 218:05592fd7a436
nginx-0.0.1-2004-01-05-23:55:48 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Jan 2004 20:55:48 +0000 |
parents | f1d0e5f09c1e |
children | cd71b95716b4 |
comparison
equal
deleted
inserted
replaced
217:c5d1cdcb04ec | 218:05592fd7a436 |
---|---|
146 ngx_conf_set_flag_slot, | 146 ngx_conf_set_flag_slot, |
147 NGX_HTTP_LOC_CONF_OFFSET, | 147 NGX_HTTP_LOC_CONF_OFFSET, |
148 offsetof(ngx_http_core_loc_conf_t, sendfile), | 148 offsetof(ngx_http_core_loc_conf_t, sendfile), |
149 NULL }, | 149 NULL }, |
150 | 150 |
151 { ngx_string("tcp_nopush"), | |
152 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
153 ngx_conf_set_flag_slot, | |
154 NGX_HTTP_LOC_CONF_OFFSET, | |
155 offsetof(ngx_http_core_loc_conf_t, tcp_nopush), | |
156 NULL }, | |
157 | |
151 { ngx_string("send_timeout"), | 158 { ngx_string("send_timeout"), |
152 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | 159 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, |
153 ngx_conf_set_msec_slot, | 160 ngx_conf_set_msec_slot, |
154 NGX_HTTP_LOC_CONF_OFFSET, | 161 NGX_HTTP_LOC_CONF_OFFSET, |
155 offsetof(ngx_http_core_loc_conf_t, send_timeout), | 162 offsetof(ngx_http_core_loc_conf_t, send_timeout), |
501 if (!(ngx_io.flags & NGX_IO_SENDFILE) || !clcf->sendfile) { | 508 if (!(ngx_io.flags & NGX_IO_SENDFILE) || !clcf->sendfile) { |
502 r->sendfile = 0; | 509 r->sendfile = 0; |
503 | 510 |
504 } else { | 511 } else { |
505 r->sendfile = 1; | 512 r->sendfile = 1; |
513 } | |
514 | |
515 if (!clcf->tcp_nopush) { | |
516 /* disable TCP_NOPUSH/TCP_CORK use */ | |
517 r->connection->tcp_nopush = -1; | |
506 } | 518 } |
507 | 519 |
508 if (auto_redirect) { | 520 if (auto_redirect) { |
509 if (!(r->headers_out.location = | 521 if (!(r->headers_out.location = |
510 ngx_http_add_header(&r->headers_out, ngx_http_headers_out))) | 522 ngx_http_add_header(&r->headers_out, ngx_http_headers_out))) |
1126 | 1138 |
1127 */ | 1139 */ |
1128 | 1140 |
1129 lcf->client_body_timeout = NGX_CONF_UNSET; | 1141 lcf->client_body_timeout = NGX_CONF_UNSET; |
1130 lcf->sendfile = NGX_CONF_UNSET; | 1142 lcf->sendfile = NGX_CONF_UNSET; |
1143 lcf->tcp_nopush = NGX_CONF_UNSET; | |
1131 lcf->send_timeout = NGX_CONF_UNSET; | 1144 lcf->send_timeout = NGX_CONF_UNSET; |
1132 lcf->send_lowat = NGX_CONF_UNSET; | 1145 lcf->send_lowat = NGX_CONF_UNSET; |
1133 lcf->discarded_buffer_size = NGX_CONF_UNSET; | 1146 lcf->discarded_buffer_size = NGX_CONF_UNSET; |
1134 lcf->keepalive_timeout = NGX_CONF_UNSET; | 1147 lcf->keepalive_timeout = NGX_CONF_UNSET; |
1135 lcf->lingering_time = NGX_CONF_UNSET; | 1148 lcf->lingering_time = NGX_CONF_UNSET; |
1204 prev->default_type, "text/plain"); | 1217 prev->default_type, "text/plain"); |
1205 | 1218 |
1206 ngx_conf_merge_msec_value(conf->client_body_timeout, | 1219 ngx_conf_merge_msec_value(conf->client_body_timeout, |
1207 prev->client_body_timeout, 10000); | 1220 prev->client_body_timeout, 10000); |
1208 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); | 1221 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); |
1222 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); | |
1209 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 10000); | 1223 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 10000); |
1210 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); | 1224 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); |
1211 ngx_conf_merge_size_value(conf->discarded_buffer_size, | 1225 ngx_conf_merge_size_value(conf->discarded_buffer_size, |
1212 prev->discarded_buffer_size, 1500); | 1226 prev->discarded_buffer_size, 1500); |
1213 ngx_conf_merge_msec_value(conf->keepalive_timeout, | 1227 ngx_conf_merge_msec_value(conf->keepalive_timeout, |