diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2005-06-07 15:56:31 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2005-06-07 15:56:31 +0000 |
| commit | 7b190b41b0d9885e523f3efd9efcbf94b6abe961 (patch) | |
| tree | 4a5e4edda3e4a287a4343e341df38b9c7495ee82 /src/http/ngx_http_core_module.c | |
| parent | 3c8b02a267b310fb0926ee3c63196f976720e113 (diff) | |
| download | nginx-release-0.1.35.tar.gz nginx-release-0.1.35.tar.bz2 | |
nginx-0.1.35-RELEASE importrelease-0.1.35
*) Feature: the "working_directory" directive.
*) Feature: the "port_in_redirect" directive.
*) Bugfix: the segmentation fault was occurred if the backend response
header was in several packets; the bug had appeared in 0.1.29.
*) Bugfix: if more than 10 servers were configured or some server did
not use the "listen" directive, then the segmentation fault was
occurred on the start.
*) Bugfix: the segmentation fault might occur if the response was
bigger than the temporary file.
*) Bugfix: nginx returned the 400 response on requests like
"GET http://www.domain.com/uri HTTP/1.0"; the bug had appeared in
0.1.28.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 42c8211d1..02795799a 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -319,6 +319,13 @@ static ngx_command_t ngx_http_core_commands[] = { offsetof(ngx_http_core_loc_conf_t, reset_timedout_connection), NULL }, + { ngx_string("port_in_redirect"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, + ngx_conf_set_flag_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_core_loc_conf_t, port_in_redirect), + NULL }, + { ngx_string("msie_padding"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, ngx_conf_set_flag_slot, @@ -1113,10 +1120,10 @@ ngx_http_delay_handler(ngx_http_request_t *r) static char * ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) { - int m; char *rv; void *mconf; - ngx_conf_t save; + ngx_uint_t m; + ngx_conf_t pcf; ngx_http_module_t *module; ngx_http_conf_ctx_t *ctx, *http_ctx; ngx_http_core_srv_conf_t *cscf, **cscfp; @@ -1189,13 +1196,13 @@ ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) /* parse inside server{} */ - save = *cf; + pcf = *cf; cf->ctx = ctx; cf->cmd_type = NGX_HTTP_SRV_CONF; rv = ngx_conf_parse(cf, NULL); - *cf = save; + *cf = pcf; if (rv != NGX_CONF_OK) { return rv; @@ -1622,6 +1629,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) ls->port = (getuid() == 0) ? 80 : 8000; #endif ls->family = AF_INET; + ls->default_server = 0; } if (conf->server_names.nelts == 0) { @@ -1726,6 +1734,7 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf) lcf->lingering_time = NGX_CONF_UNSET_MSEC; lcf->lingering_timeout = NGX_CONF_UNSET_MSEC; lcf->reset_timedout_connection = NGX_CONF_UNSET; + lcf->port_in_redirect = NGX_CONF_UNSET; lcf->msie_padding = NGX_CONF_UNSET; return lcf; @@ -1839,6 +1848,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, ngx_conf_merge_value(conf->reset_timedout_connection, prev->reset_timedout_connection, 0); + ngx_conf_merge_value(conf->port_in_redirect, prev->port_in_redirect, 1); ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); if (conf->open_files == NULL) { @@ -1857,8 +1867,8 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) u_char *addr; ngx_int_t port; ngx_uint_t p; - struct hostent *h; ngx_str_t *args; + struct hostent *h; ngx_http_listen_t *ls; /* @@ -1874,9 +1884,9 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) /* AF_INET only */ ls->family = AF_INET; - ls->default_server = 0; ls->file_name = cf->conf_file->file.name; ls->line = cf->conf_file->line; + ls->default_server = 0; args = cf->args->elts; addr = args[1].data; |
