#include <ngx_http_variables.h>
+#include <ngx_http_config.h>
#include <ngx_http_request.h>
#include <ngx_http_script.h>
#include <ngx_http_upstream.h>
#include <ngx_http_upstream_round_robin.h>
-#include <ngx_http_config.h>
#include <ngx_http_busy_lock.h>
#include <ngx_http_core_module.h>
}
}
+ /* the default server configuration for the address:port */
+ hc->conf_ctx = hc->addr_conf->default_server->ctx;
+
ctx = ngx_palloc(c->pool, sizeof(ngx_http_log_ctx_t));
if (ctx == NULL) {
ngx_http_close_connection(c);
r->connection = c;
- /* the default server configuration for the address:port */
- cscf = hc->addr_conf->default_server;
-
- r->main_conf = cscf->ctx->main_conf;
- r->srv_conf = cscf->ctx->srv_conf;
- r->loc_conf = cscf->ctx->loc_conf;
+ r->main_conf = hc->conf_ctx->main_conf;
+ r->srv_conf = hc->conf_ctx->srv_conf;
+ r->loc_conf = hc->conf_ctx->loc_conf;
rev->handler = ngx_http_process_request_line;
r->read_event_handler = ngx_http_block_reading;
ngx_http_set_connection_log(r->connection, clcf->error_log);
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
+
if (c->buffer == NULL) {
c->buffer = ngx_create_temp_buf(c->pool,
cscf->client_header_buffer_size);
return SSL_TLSEXT_ERR_NOACK;
}
+ hc->conf_ctx = cscf->ctx;
+
r->srv_conf = cscf->ctx->srv_conf;
r->loc_conf = cscf->ctx->loc_conf;