comparison src/http/ngx_http_core_module.c @ 518:86dad910eeb6 NGINX_0_8_11

nginx 0.8.11 *) Change: directive "gzip_disable msie6" enables gzipping for MSIE 6.0 SV1. *) Feature: file AIO support on FreeBSD and Linux. *) Feature: the "directio_alignment" directive.
author Igor Sysoev <http://sysoev.ru>
date Fri, 28 Aug 2009 00:00:00 +0400
parents 4b0d7f0bf22b
children d41628eb4d0a
comparison
equal deleted inserted replaced
517:15b5cddc5190 518:86dad910eeb6
381 ngx_conf_set_size_slot, 381 ngx_conf_set_size_slot,
382 NGX_HTTP_LOC_CONF_OFFSET, 382 NGX_HTTP_LOC_CONF_OFFSET,
383 offsetof(ngx_http_core_loc_conf_t, sendfile_max_chunk), 383 offsetof(ngx_http_core_loc_conf_t, sendfile_max_chunk),
384 NULL }, 384 NULL },
385 385
386 #if (NGX_HAVE_FILE_AIO)
387
388 { ngx_string("aio"),
389 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
390 ngx_conf_set_flag_slot,
391 NGX_HTTP_LOC_CONF_OFFSET,
392 offsetof(ngx_http_core_loc_conf_t, aio),
393 NULL },
394
395 #endif
396
386 { ngx_string("directio"), 397 { ngx_string("directio"),
387 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, 398 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
388 ngx_http_core_directio, 399 ngx_http_core_directio,
389 NGX_HTTP_LOC_CONF_OFFSET, 400 NGX_HTTP_LOC_CONF_OFFSET,
390 0, 401 0,
402 NULL },
403
404 { ngx_string("directio_alignment"),
405 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
406 ngx_conf_set_off_slot,
407 NGX_HTTP_LOC_CONF_OFFSET,
408 offsetof(ngx_http_core_loc_conf_t, directio_alignment),
391 NULL }, 409 NULL },
392 410
393 { ngx_string("tcp_nopush"), 411 { ngx_string("tcp_nopush"),
394 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 412 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
395 ngx_conf_set_flag_slot, 413 ngx_conf_set_flag_slot,
1258 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1276 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1259 "content phase: %ui", r->phase_handler); 1277 "content phase: %ui", r->phase_handler);
1260 1278
1261 rc = ph->handler(r); 1279 rc = ph->handler(r);
1262 1280
1263 if (rc == NGX_DONE) {
1264 return NGX_OK;
1265 }
1266
1267 if (rc != NGX_DECLINED) { 1281 if (rc != NGX_DECLINED) {
1268 ngx_http_finalize_request(r, rc); 1282 ngx_http_finalize_request(r, rc);
1269 return NGX_OK; 1283 return NGX_OK;
1270 } 1284 }
1271 1285
1687 "http output filter \"%V?%V\"", &r->uri, &r->args); 1701 "http output filter \"%V?%V\"", &r->uri, &r->args);
1688 1702
1689 rc = ngx_http_top_body_filter(r, in); 1703 rc = ngx_http_top_body_filter(r, in);
1690 1704
1691 if (rc == NGX_ERROR) { 1705 if (rc == NGX_ERROR) {
1692
1693 if (c->destroyed) {
1694 return NGX_DONE;
1695 }
1696
1697 /* NGX_ERROR may be returned by any filter */ 1706 /* NGX_ERROR may be returned by any filter */
1698 c->error = 1; 1707 c->error = 1;
1699 } 1708 }
1700 1709
1701 return rc; 1710 return rc;
2124 sr->main_filter_need_in_memory = r->main_filter_need_in_memory; 2133 sr->main_filter_need_in_memory = r->main_filter_need_in_memory;
2125 2134
2126 sr->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1; 2135 sr->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1;
2127 2136
2128 r->main->subrequests++; 2137 r->main->subrequests++;
2138 r->main->count++;
2129 2139
2130 *psr = sr; 2140 *psr = sr;
2131 2141
2132 return ngx_http_post_request(sr); 2142 return ngx_http_post_request(sr);
2133 } 2143 }
2176 #if (NGX_HTTP_CACHE) 2186 #if (NGX_HTTP_CACHE)
2177 r->cache = NULL; 2187 r->cache = NULL;
2178 #endif 2188 #endif
2179 2189
2180 r->internal = 1; 2190 r->internal = 1;
2191 r->main->count++;
2181 2192
2182 ngx_http_handler(r); 2193 ngx_http_handler(r);
2183 2194
2184 return NGX_DONE; 2195 return NGX_DONE;
2185 } 2196 }
2189 ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name) 2200 ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name)
2190 { 2201 {
2191 ngx_http_core_srv_conf_t *cscf; 2202 ngx_http_core_srv_conf_t *cscf;
2192 ngx_http_core_loc_conf_t **clcfp; 2203 ngx_http_core_loc_conf_t **clcfp;
2193 ngx_http_core_main_conf_t *cmcf; 2204 ngx_http_core_main_conf_t *cmcf;
2205
2206 r->main->count++;
2194 2207
2195 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); 2208 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
2196 2209
2197 if (cscf->named_locations) { 2210 if (cscf->named_locations) {
2198 2211
2919 lcf->client_body_in_file_only = NGX_CONF_UNSET_UINT; 2932 lcf->client_body_in_file_only = NGX_CONF_UNSET_UINT;
2920 lcf->client_body_in_single_buffer = NGX_CONF_UNSET; 2933 lcf->client_body_in_single_buffer = NGX_CONF_UNSET;
2921 lcf->internal = NGX_CONF_UNSET; 2934 lcf->internal = NGX_CONF_UNSET;
2922 lcf->sendfile = NGX_CONF_UNSET; 2935 lcf->sendfile = NGX_CONF_UNSET;
2923 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE; 2936 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE;
2937 #if (NGX_HAVE_FILE_AIO)
2938 lcf->aio = NGX_CONF_UNSET;
2939 #endif
2924 lcf->directio = NGX_CONF_UNSET; 2940 lcf->directio = NGX_CONF_UNSET;
2941 lcf->directio_alignment = NGX_CONF_UNSET;
2925 lcf->tcp_nopush = NGX_CONF_UNSET; 2942 lcf->tcp_nopush = NGX_CONF_UNSET;
2926 lcf->tcp_nodelay = NGX_CONF_UNSET; 2943 lcf->tcp_nodelay = NGX_CONF_UNSET;
2927 lcf->send_timeout = NGX_CONF_UNSET_MSEC; 2944 lcf->send_timeout = NGX_CONF_UNSET_MSEC;
2928 lcf->send_lowat = NGX_CONF_UNSET_SIZE; 2945 lcf->send_lowat = NGX_CONF_UNSET_SIZE;
2929 lcf->postpone_output = NGX_CONF_UNSET_SIZE; 2946 lcf->postpone_output = NGX_CONF_UNSET_SIZE;
3116 prev->client_body_in_single_buffer, 0); 3133 prev->client_body_in_single_buffer, 0);
3117 ngx_conf_merge_value(conf->internal, prev->internal, 0); 3134 ngx_conf_merge_value(conf->internal, prev->internal, 0);
3118 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); 3135 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
3119 ngx_conf_merge_size_value(conf->sendfile_max_chunk, 3136 ngx_conf_merge_size_value(conf->sendfile_max_chunk,
3120 prev->sendfile_max_chunk, 0); 3137 prev->sendfile_max_chunk, 0);
3138 #if (NGX_HAVE_FILE_AIO)
3139 ngx_conf_merge_value(conf->aio, prev->aio, 0);
3140 #endif
3121 ngx_conf_merge_off_value(conf->directio, prev->directio, 3141 ngx_conf_merge_off_value(conf->directio, prev->directio,
3122 NGX_MAX_OFF_T_VALUE); 3142 NGX_MAX_OFF_T_VALUE);
3143 ngx_conf_merge_off_value(conf->directio_alignment, prev->directio_alignment,
3144 512);
3123 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); 3145 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0);
3124 ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1); 3146 ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1);
3125 3147
3126 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); 3148 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000);
3127 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); 3149 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0);