mirror of
https://github.com/nginx/nginx.git
synced 2025-01-05 13:44:56 -06:00
nginx-0.0.3-2004-04-23-20:50:51 import
This commit is contained in:
parent
e772e8fef5
commit
a040f00167
@ -170,7 +170,7 @@ static ngx_int_t ngx_event_module_init(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
|
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
|
||||||
|
|
||||||
if (ccf->master == 0) {
|
if (ccf->master == 0 || ngx_accept_mutex_ptr) {
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,6 +196,10 @@ static ngx_int_t ngx_event_module_init(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
ngx_connection_counter = (ngx_atomic_t *) (shared + 128);
|
ngx_connection_counter = (ngx_atomic_t *) (shared + 128);
|
||||||
|
|
||||||
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||||
|
"counter: " PTR_FMT ", %d",
|
||||||
|
ngx_connection_counter, *ngx_connection_counter);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
|
@ -666,10 +666,6 @@ static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
|
|
||||||
ctx->done = 1;
|
ctx->done = 1;
|
||||||
|
|
||||||
#if 0
|
|
||||||
ngx_http_delete_ctx(r, ngx_http_gzip_filter_module);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,11 +32,13 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ngx_array_t rules;
|
ngx_array_t rules;
|
||||||
unsigned log:1;
|
ngx_flag_t log;
|
||||||
} ngx_http_rewrite_srv_conf_t;
|
} ngx_http_rewrite_srv_conf_t;
|
||||||
|
|
||||||
|
|
||||||
static void *ngx_http_rewrite_create_loc_conf(ngx_conf_t *cf);
|
static void *ngx_http_rewrite_create_srv_conf(ngx_conf_t *cf);
|
||||||
|
static char *ngx_http_rewrite_merge_srv_conf(ngx_conf_t *cf,
|
||||||
|
void *parent, void *child);
|
||||||
static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
|
static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
|
||||||
void *conf);
|
void *conf);
|
||||||
static ngx_int_t ngx_http_rewrite_init(ngx_cycle_t *cycle);
|
static ngx_int_t ngx_http_rewrite_init(ngx_cycle_t *cycle);
|
||||||
@ -51,6 +53,13 @@ static ngx_command_t ngx_http_rewrite_commands[] = {
|
|||||||
0,
|
0,
|
||||||
NULL },
|
NULL },
|
||||||
|
|
||||||
|
{ ngx_string("rewrite_log"),
|
||||||
|
NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
|
||||||
|
ngx_conf_set_flag_slot,
|
||||||
|
NGX_HTTP_SRV_CONF_OFFSET,
|
||||||
|
offsetof(ngx_http_rewrite_srv_conf_t, log),
|
||||||
|
NULL },
|
||||||
|
|
||||||
ngx_null_command
|
ngx_null_command
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,8 +70,8 @@ ngx_http_module_t ngx_http_rewrite_module_ctx = {
|
|||||||
NULL, /* create main configuration */
|
NULL, /* create main configuration */
|
||||||
NULL, /* init main configuration */
|
NULL, /* init main configuration */
|
||||||
|
|
||||||
ngx_http_rewrite_create_loc_conf, /* create server configuration */
|
ngx_http_rewrite_create_srv_conf, /* create server configuration */
|
||||||
NULL, /* merge server configuration */
|
ngx_http_rewrite_merge_srv_conf, /* merge server configuration */
|
||||||
|
|
||||||
NULL, /* create location configration */
|
NULL, /* create location configration */
|
||||||
NULL, /* merge location configration */
|
NULL, /* merge location configration */
|
||||||
@ -187,7 +196,7 @@ static ngx_int_t ngx_http_rewrite_handler(ngx_http_request_t *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void *ngx_http_rewrite_create_loc_conf(ngx_conf_t *cf)
|
static void *ngx_http_rewrite_create_srv_conf(ngx_conf_t *cf)
|
||||||
{
|
{
|
||||||
ngx_http_rewrite_srv_conf_t *conf;
|
ngx_http_rewrite_srv_conf_t *conf;
|
||||||
|
|
||||||
@ -198,12 +207,24 @@ static void *ngx_http_rewrite_create_loc_conf(ngx_conf_t *cf)
|
|||||||
ngx_init_array(conf->rules, cf->pool, 5, sizeof(ngx_http_rewrite_rule_t),
|
ngx_init_array(conf->rules, cf->pool, 5, sizeof(ngx_http_rewrite_rule_t),
|
||||||
NGX_CONF_ERROR);
|
NGX_CONF_ERROR);
|
||||||
|
|
||||||
conf->log = 1;
|
conf->log = NGX_CONF_UNSET;
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char *ngx_http_rewrite_merge_srv_conf(ngx_conf_t *cf,
|
||||||
|
void *parent, void *child)
|
||||||
|
{
|
||||||
|
ngx_http_rewrite_srv_conf_t *prev = parent;
|
||||||
|
ngx_http_rewrite_srv_conf_t *conf = child;
|
||||||
|
|
||||||
|
ngx_conf_merge_value(conf->log, prev->log, 0);
|
||||||
|
|
||||||
|
return NGX_CONF_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
|
static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
|
||||||
void *conf)
|
void *conf)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user