comparison src/http/ngx_http_core_module.c @ 2640:a69e3766f698 stable-0.6

r2362, r2497 merge: if_modified_since
author Igor Sysoev <igor@sysoev.ru>
date Wed, 01 Apr 2009 15:58:21 +0000
parents 6175f886ddfb
children 87e1fcd9b604
comparison
equal deleted inserted replaced
2639:8deee4408c94 2640:a69e3766f698
112 { ngx_string("any"), NGX_HTTP_SATISFY_ANY }, 112 { ngx_string("any"), NGX_HTTP_SATISFY_ANY },
113 { ngx_null_string, 0 } 113 { ngx_null_string, 0 }
114 }; 114 };
115 115
116 116
117 static ngx_conf_enum_t ngx_http_core_if_modified_since[] = {
118 { ngx_string("off"), NGX_HTTP_IMS_OFF },
119 { ngx_string("exact"), NGX_HTTP_IMS_EXACT },
120 { ngx_string("before"), NGX_HTTP_IMS_BEFORE },
121 { ngx_null_string, 0 }
122 };
123
124
117 #if (NGX_HTTP_GZIP) 125 #if (NGX_HTTP_GZIP)
118 126
119 static ngx_conf_enum_t ngx_http_gzip_http_version[] = { 127 static ngx_conf_enum_t ngx_http_gzip_http_version[] = {
120 { ngx_string("1.0"), NGX_HTTP_VERSION_10 }, 128 { ngx_string("1.0"), NGX_HTTP_VERSION_10 },
121 { ngx_string("1.1"), NGX_HTTP_VERSION_11 }, 129 { ngx_string("1.1"), NGX_HTTP_VERSION_11 },
504 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 512 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
505 ngx_conf_set_flag_slot, 513 ngx_conf_set_flag_slot,
506 NGX_HTTP_LOC_CONF_OFFSET, 514 NGX_HTTP_LOC_CONF_OFFSET,
507 offsetof(ngx_http_core_loc_conf_t, server_tokens), 515 offsetof(ngx_http_core_loc_conf_t, server_tokens),
508 NULL }, 516 NULL },
517
518 { ngx_string("if_modified_since"),
519 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
520 ngx_conf_set_enum_slot,
521 NGX_HTTP_LOC_CONF_OFFSET,
522 offsetof(ngx_http_core_loc_conf_t, if_modified_since),
523 &ngx_http_core_if_modified_since },
509 524
510 { ngx_string("error_page"), 525 { ngx_string("error_page"),
511 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF 526 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
512 |NGX_CONF_2MORE, 527 |NGX_CONF_2MORE,
513 ngx_http_core_error_page, 528 ngx_http_core_error_page,
2682 2697
2683 lcf->client_max_body_size = NGX_CONF_UNSET; 2698 lcf->client_max_body_size = NGX_CONF_UNSET;
2684 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE; 2699 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE;
2685 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC; 2700 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC;
2686 lcf->satisfy = NGX_CONF_UNSET_UINT; 2701 lcf->satisfy = NGX_CONF_UNSET_UINT;
2702 lcf->if_modified_since = NGX_CONF_UNSET_UINT;
2687 lcf->internal = NGX_CONF_UNSET; 2703 lcf->internal = NGX_CONF_UNSET;
2688 lcf->client_body_in_file_only = NGX_CONF_UNSET; 2704 lcf->client_body_in_file_only = NGX_CONF_UNSET;
2689 lcf->sendfile = NGX_CONF_UNSET; 2705 lcf->sendfile = NGX_CONF_UNSET;
2690 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE; 2706 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE;
2691 lcf->tcp_nopush = NGX_CONF_UNSET; 2707 lcf->tcp_nopush = NGX_CONF_UNSET;
2868 ngx_conf_merge_msec_value(conf->client_body_timeout, 2884 ngx_conf_merge_msec_value(conf->client_body_timeout,
2869 prev->client_body_timeout, 60000); 2885 prev->client_body_timeout, 60000);
2870 2886
2871 ngx_conf_merge_uint_value(conf->satisfy, prev->satisfy, 2887 ngx_conf_merge_uint_value(conf->satisfy, prev->satisfy,
2872 NGX_HTTP_SATISFY_ALL); 2888 NGX_HTTP_SATISFY_ALL);
2889 ngx_conf_merge_uint_value(conf->if_modified_since, prev->if_modified_since,
2890 NGX_HTTP_IMS_EXACT);
2873 ngx_conf_merge_value(conf->internal, prev->internal, 0); 2891 ngx_conf_merge_value(conf->internal, prev->internal, 0);
2874 ngx_conf_merge_value(conf->client_body_in_file_only, 2892 ngx_conf_merge_value(conf->client_body_in_file_only,
2875 prev->client_body_in_file_only, 0); 2893 prev->client_body_in_file_only, 0);
2876 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); 2894 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
2877 ngx_conf_merge_size_value(conf->sendfile_max_chunk, 2895 ngx_conf_merge_size_value(conf->sendfile_max_chunk,