comparison src/http/ngx_http_core_module.c @ 424:9da1d9d94d18 NGINX_0_7_24

nginx 0.7.24 *) Feature: the "if_modified_since" directive. *) Bugfix: nginx did not process a FastCGI server response, if the server send too many messages to stderr before response. *) Bugfix: the "$cookie_..." variables did not work in the SSI and the perl module.
author Igor Sysoev <http://sysoev.ru>
date Mon, 01 Dec 2008 00:00:00 +0300
parents b4f69f2ef02c
children e7dbea1ee115
comparison
equal deleted inserted replaced
423:ca440bb56eca 424:9da1d9d94d18
106 { ngx_string("any"), NGX_HTTP_SATISFY_ANY }, 106 { ngx_string("any"), NGX_HTTP_SATISFY_ANY },
107 { ngx_null_string, 0 } 107 { ngx_null_string, 0 }
108 }; 108 };
109 109
110 110
111 static ngx_conf_enum_t ngx_http_core_if_modified_since[] = {
112 { ngx_string("exact"), 0 },
113 { ngx_string("before"), 1 },
114 { ngx_null_string, 0 }
115 };
116
117
111 #if (NGX_HTTP_GZIP) 118 #if (NGX_HTTP_GZIP)
112 119
113 static ngx_conf_enum_t ngx_http_gzip_http_version[] = { 120 static ngx_conf_enum_t ngx_http_gzip_http_version[] = {
114 { ngx_string("1.0"), NGX_HTTP_VERSION_10 }, 121 { ngx_string("1.0"), NGX_HTTP_VERSION_10 },
115 { ngx_string("1.1"), NGX_HTTP_VERSION_11 }, 122 { ngx_string("1.1"), NGX_HTTP_VERSION_11 },
512 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, 519 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
513 ngx_conf_set_flag_slot, 520 ngx_conf_set_flag_slot,
514 NGX_HTTP_LOC_CONF_OFFSET, 521 NGX_HTTP_LOC_CONF_OFFSET,
515 offsetof(ngx_http_core_loc_conf_t, server_tokens), 522 offsetof(ngx_http_core_loc_conf_t, server_tokens),
516 NULL }, 523 NULL },
524
525 { ngx_string("if_modified_since"),
526 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
527 ngx_conf_set_enum_slot,
528 NGX_HTTP_LOC_CONF_OFFSET,
529 offsetof(ngx_http_core_loc_conf_t, if_modified_since),
530 &ngx_http_core_if_modified_since },
517 531
518 { ngx_string("error_page"), 532 { ngx_string("error_page"),
519 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF 533 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
520 |NGX_CONF_2MORE, 534 |NGX_CONF_2MORE,
521 ngx_http_core_error_page, 535 ngx_http_core_error_page,
2661 2675
2662 lcf->client_max_body_size = NGX_CONF_UNSET; 2676 lcf->client_max_body_size = NGX_CONF_UNSET;
2663 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE; 2677 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE;
2664 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC; 2678 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC;
2665 lcf->satisfy = NGX_CONF_UNSET_UINT; 2679 lcf->satisfy = NGX_CONF_UNSET_UINT;
2680 lcf->if_modified_since = NGX_CONF_UNSET_UINT;
2666 lcf->internal = NGX_CONF_UNSET; 2681 lcf->internal = NGX_CONF_UNSET;
2667 lcf->client_body_in_file_only = NGX_CONF_UNSET; 2682 lcf->client_body_in_file_only = NGX_CONF_UNSET;
2668 lcf->sendfile = NGX_CONF_UNSET; 2683 lcf->sendfile = NGX_CONF_UNSET;
2669 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE; 2684 lcf->sendfile_max_chunk = NGX_CONF_UNSET_SIZE;
2670 lcf->directio = NGX_CONF_UNSET; 2685 lcf->directio = NGX_CONF_UNSET;
2850 ngx_conf_merge_msec_value(conf->client_body_timeout, 2865 ngx_conf_merge_msec_value(conf->client_body_timeout,
2851 prev->client_body_timeout, 60000); 2866 prev->client_body_timeout, 60000);
2852 2867
2853 ngx_conf_merge_uint_value(conf->satisfy, prev->satisfy, 2868 ngx_conf_merge_uint_value(conf->satisfy, prev->satisfy,
2854 NGX_HTTP_SATISFY_ALL); 2869 NGX_HTTP_SATISFY_ALL);
2870 ngx_conf_merge_uint_value(conf->if_modified_since, prev->if_modified_since,
2871 0);
2855 ngx_conf_merge_value(conf->internal, prev->internal, 0); 2872 ngx_conf_merge_value(conf->internal, prev->internal, 0);
2856 ngx_conf_merge_value(conf->client_body_in_file_only, 2873 ngx_conf_merge_value(conf->client_body_in_file_only,
2857 prev->client_body_in_file_only, 0); 2874 prev->client_body_in_file_only, 0);
2858 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); 2875 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0);
2859 ngx_conf_merge_size_value(conf->sendfile_max_chunk, 2876 ngx_conf_merge_size_value(conf->sendfile_max_chunk,