unsigned len:29;
unsigned valid:1;
- unsigned no_cachable:1;
+ unsigned no_cacheable:1;
unsigned not_found:1;
u_char *data;
#include <ngx_event.h>
-static ngx_int_t ngx_event_busy_lock_look_cachable(ngx_event_busy_lock_t *bl,
+static ngx_int_t ngx_event_busy_lock_look_cacheable(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx);
static void ngx_event_busy_lock_handler(ngx_event_t *ev);
static void ngx_event_busy_lock_posted_handler(ngx_event_t *ev);
ngx_int_t
-ngx_event_busy_lock_cachable(ngx_event_busy_lock_t *bl,
+ngx_event_busy_lock_cacheable(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx)
{
ngx_int_t rc;
ngx_mutex_lock(bl->mutex);
- rc = ngx_event_busy_lock_look_cachable(bl, ctx);
+ rc = ngx_event_busy_lock_look_cacheable(bl, ctx);
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ctx->event->log, 0,
"event busy lock: %d w:%d mw:%d",
static ngx_int_t
-ngx_event_busy_lock_look_cachable(ngx_event_busy_lock_t *bl,
+ngx_event_busy_lock_look_cacheable(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx)
{
ngx_int_t free;
- ngx_uint_t i, bit, cachable, mask;
+ ngx_uint_t i, bit, cacheable, mask;
bit = 0;
- cachable = 0;
+ cacheable = 0;
free = -1;
#if (NGX_SUPPRESS_WARN)
ctx->slot = i;
return NGX_AGAIN;
}
- cachable++;
+ cacheable++;
} else if (free == -1) {
free = i;
}
- if (cachable == bl->cachable) {
- if (free == -1 && cachable < bl->max_busy) {
+ if (cacheable == bl->cacheable) {
+ if (free == -1 && cacheable < bl->max_busy) {
free = i + 1;
}
bl->md5_mask[free / 8] |= 1 << (free & 7);
ctx->slot = free;
- bl->cachable++;
+ bl->cacheable++;
bl->busy++;
return NGX_OK;
typedef struct {
u_char *md5_mask;
char *md5;
- ngx_uint_t cachable;
+ ngx_uint_t cacheable;
ngx_uint_t busy;
ngx_uint_t max_busy;
ngx_int_t ngx_event_busy_lock(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx);
-ngx_int_t ngx_event_busy_lock_cachable(ngx_event_busy_lock_t *bl,
+ngx_int_t ngx_event_busy_lock_cacheable(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx);
void ngx_event_busy_unlock(ngx_event_busy_lock_t *bl,
ngx_event_busy_lock_ctx_t *ctx);
chain->buf = b;
chain->next = NULL;
- } else if (!p->cachable
+ } else if (!p->cacheable
&& p->downstream->data == p->output_ctx
&& p->downstream->write->ready
&& !p->downstream->write->delayed)
break;
- } else if (p->cachable
+ } else if (p->cacheable
|| p->temp_file->offset < p->max_temp_file_size)
{
}
}
- if (p->cachable && p->in) {
+ if (p->cacheable && p->in) {
if (ngx_event_pipe_write_chain_to_temp_file(p) == NGX_ABORT) {
return NGX_ABORT;
}
ngx_event_pipe_free_shadow_raw_buf(&p->free_raw_bufs, cl->buf);
- } else if (!p->cachable && p->in) {
+ } else if (!p->cacheable && p->in) {
cl = p->in;
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, p->log, 0,
for (cl = p->free; cl; cl = cl->next) {
if (cl->buf->temp_file) {
- if (p->cachable || !p->cyclic_temp_file) {
+ if (p->cacheable || !p->cyclic_temp_file) {
continue;
}
out = p->in;
}
- if (!p->cachable) {
+ if (!p->cacheable) {
size = 0;
cl = out;
void *output_ctx;
unsigned read:1;
- unsigned cachable:1;
+ unsigned cacheable:1;
unsigned single_buf:1;
unsigned free_bufs:1;
unsigned upstream_done:1;
for (var = ngx_http_browsers; var->name.len; var++) {
- v = ngx_http_add_variable(cf, &var->name, NGX_HTTP_VAR_CHANGABLE);
+ v = ngx_http_add_variable(cf, &var->name, NGX_HTTP_VAR_CHANGEABLE);
if (v == NULL) {
return NGX_ERROR;
}
bcf->modern_browser_value->len = value[1].len;
bcf->modern_browser_value->valid = 1;
- bcf->modern_browser_value->no_cachable = 0;
+ bcf->modern_browser_value->no_cacheable = 0;
bcf->modern_browser_value->not_found = 0;
bcf->modern_browser_value->data = value[1].data;
bcf->ancient_browser_value->len = value[1].len;
bcf->ancient_browser_value->valid = 1;
- bcf->ancient_browser_value->no_cachable = 0;
+ bcf->ancient_browser_value->no_cacheable = 0;
bcf->ancient_browser_value->not_found = 0;
bcf->ancient_browser_value->data = value[1].data;
if (flcf->params_len) {
ngx_memzero(&le, sizeof(ngx_http_script_engine_t));
- ngx_http_script_flush_no_cachable_variables(r, flcf->flushes);
+ ngx_http_script_flush_no_cacheable_variables(r, flcf->flushes);
le.flushed = 1;
le.ip = flcf->params_len->elts;
u->state->status = u->headers_in.status_n;
#if 0
- if (u->cachable) {
- u->cachable = ngx_http_upstream_is_cachable(r);
+ if (u->cacheable) {
+ u->cacheable = ngx_http_upstream_is_cacheable(r);
}
#endif
ngx_http_variable_t *var;
var = ngx_http_add_variable(cf, &ngx_http_fastcgi_script_name,
- NGX_HTTP_VAR_NOHASH|NGX_HTTP_VAR_NOCACHABLE);
+ NGX_HTTP_VAR_NOHASH|NGX_HTTP_VAR_NOCACHEABLE);
if (var == NULL) {
return NGX_ERROR;
}
if (r->uri.len) {
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module);
} else {
v->len = 0;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = NULL;
name.data++;
}
- var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGABLE);
+ var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE);
if (var == NULL) {
return NGX_CONF_ERROR;
}
}
var->valid = 1;
- var->no_cachable = 0;
+ var->no_cacheable = 0;
var->not_found = 0;
v = ngx_array_push(&ctx->values);
ngx_http_gzip_ctx_t *ctx;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
ctx = ngx_http_get_module_ctx(r, ngx_http_gzip_filter_module);
name.len--;
name.data++;
- var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGABLE);
+ var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE);
if (var == NULL) {
return NGX_CONF_ERROR;
}
}
var->valid = 1;
- var->no_cachable = 0;
+ var->no_cacheable = 0;
var->not_found = 0;
vp = ngx_array_push(&ctx->values_hash[key]);
static ngx_http_variable_t ngx_http_proxy_vars[] = {
{ ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0,
- NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH, 0 },
{ ngx_string("proxy_port"), NULL, ngx_http_proxy_port_variable, 0,
- NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH, 0 },
{ ngx_string("proxy_add_x_forwarded_for"), NULL,
ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 },
len += r->uri.len - loc_len + escape + sizeof("?") - 1 + r->args.len;
}
- ngx_http_script_flush_no_cachable_variables(r, plcf->flushes);
+ ngx_http_script_flush_no_cacheable_variables(r, plcf->flushes);
if (plcf->body_set_len) {
le.ip = plcf->body_set_len->elts;
v->len = plcf->host_header.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = plcf->host_header.data;
v->len = plcf->port.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = plcf->port.data;
u_char *p;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
if (r->headers_in.x_forwarded_for == NULL) {
}
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = ngx_palloc(r->connection->pool, NGX_SIZE_T_LEN);
name.data = (u_char *) "invalid_referer";
var = ngx_http_add_variable(cf, &name,
- NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH);
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH);
if (var == NULL) {
return NGX_CONF_ERROR;
}
value[1].len--;
value[1].data++;
- v = ngx_http_add_variable(cf, &value[1], NGX_HTTP_VAR_CHANGABLE);
+ v = ngx_http_add_variable(cf, &value[1], NGX_HTTP_VAR_CHANGEABLE);
if (v == NULL) {
return NGX_CONF_ERROR;
}
static ngx_http_variable_t ngx_http_ssi_vars[] = {
{ ngx_string("date_local"), NULL, ngx_http_ssi_date_gmt_local_variable, 0,
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("date_gmt"), NULL, ngx_http_ssi_date_gmt_local_variable, 1,
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_null_string, NULL, NULL, 0, 0, 0 }
};
char buf[NGX_HTTP_SSI_DATE_LEN];
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
tp = ngx_timeofday();
static ngx_http_variable_t ngx_http_ssl_vars[] = {
{ ngx_string("ssl_protocol"), NULL, ngx_http_ssl_static_variable,
- (uintptr_t) ngx_ssl_get_protocol, NGX_HTTP_VAR_CHANGABLE, 0 },
+ (uintptr_t) ngx_ssl_get_protocol, NGX_HTTP_VAR_CHANGEABLE, 0 },
{ ngx_string("ssl_cipher"), NULL, ngx_http_ssl_static_variable,
- (uintptr_t) ngx_ssl_get_cipher_name, NGX_HTTP_VAR_CHANGABLE, 0 },
+ (uintptr_t) ngx_ssl_get_cipher_name, NGX_HTTP_VAR_CHANGEABLE, 0 },
{ ngx_string("ssl_client_s_dn"), NULL, ngx_http_ssl_variable,
- (uintptr_t) ngx_ssl_get_subject_dn, NGX_HTTP_VAR_CHANGABLE, 0 },
+ (uintptr_t) ngx_ssl_get_subject_dn, NGX_HTTP_VAR_CHANGEABLE, 0 },
{ ngx_string("ssl_client_i_dn"), NULL, ngx_http_ssl_variable,
- (uintptr_t) ngx_ssl_get_issuer_dn, NGX_HTTP_VAR_CHANGABLE, 0 },
+ (uintptr_t) ngx_ssl_get_issuer_dn, NGX_HTTP_VAR_CHANGEABLE, 0 },
{ ngx_string("ssl_client_serial"), NULL, ngx_http_ssl_variable,
- (uintptr_t) ngx_ssl_get_serial_number, NGX_HTTP_VAR_CHANGABLE, 0 },
+ (uintptr_t) ngx_ssl_get_serial_number, NGX_HTTP_VAR_CHANGEABLE, 0 },
{ ngx_null_string, NULL, NULL, 0, 0, 0 }
};
v->len = len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
return NGX_OK;
if (v->len) {
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
return NGX_OK;
}
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
ngx_sprintf(v->data, "%V=%08XD%08XD%08XD%08XD",
if (value) {
vv->len = val.len;
vv->valid = 1;
- vv->no_cachable = 0;
+ vv->no_cacheable = 0;
vv->not_found = 0;
vv->data = val.data;
if (value.data) {
v->len = value.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = value.data;
value[1].len--;
value[1].data++;
- v = ngx_http_add_variable(cf, &value[1], NGX_HTTP_VAR_CHANGABLE);
+ v = ngx_http_add_variable(cf, &value[1], NGX_HTTP_VAR_CHANGEABLE);
if (v == NULL) {
return NGX_CONF_ERROR;
}
-static int ngx_http_busy_lock_look_cachable(ngx_http_busy_lock_t *bl,
- ngx_http_busy_lock_ctx_t *bc,
- int lock);
+static int ngx_http_busy_lock_look_cacheable(ngx_http_busy_lock_t *bl,
+ ngx_http_busy_lock_ctx_t *bc,
+ int lock);
int ngx_http_busy_lock(ngx_http_busy_lock_t *bl, ngx_http_busy_lock_ctx_t *bc)
}
-int ngx_http_busy_lock_cachable(ngx_http_busy_lock_t *bl,
- ngx_http_busy_lock_ctx_t *bc, int lock)
+int ngx_http_busy_lock_cacheable(ngx_http_busy_lock_t *bl,
+ ngx_http_busy_lock_ctx_t *bc, int lock)
{
int rc;
- rc = ngx_http_busy_lock_look_cachable(bl, bc, lock);
+ rc = ngx_http_busy_lock_look_cacheable(bl, bc, lock);
ngx_log_debug3(NGX_LOG_DEBUG_HTTP, bc->event->log, 0,
"http busylock: %d w:%d mw::%d",
if (bl->md5) {
bl->md5_mask[bc->slot / 8] &= ~(1 << (bc->slot & 7));
- bl->cachable--;
+ bl->cacheable--;
}
bl->busy--;
}
-static int ngx_http_busy_lock_look_cachable(ngx_http_busy_lock_t *bl,
- ngx_http_busy_lock_ctx_t *bc,
- int lock)
+static int ngx_http_busy_lock_look_cacheable(ngx_http_busy_lock_t *bl,
+ ngx_http_busy_lock_ctx_t *bc,
+ int lock)
{
- int i, b, cachable, free;
+ int i, b, cacheable, free;
u_int mask;
b = 0;
- cachable = 0;
+ cacheable = 0;
free = -1;
#if (NGX_SUPPRESS_WARN)
if (ngx_memcmp(&bl->md5[i * 16], bc->md5, 16) == 0) {
return NGX_AGAIN;
}
- cachable++;
+ cacheable++;
} else if (free == -1) {
free = i;
}
#if 1
- if (cachable == bl->cachable) {
- if (free == -1 && cachable < bl->max_busy) {
+ if (cacheable == bl->cacheable) {
+ if (free == -1 && cacheable < bl->max_busy) {
free = i + 1;
}
bl->md5_mask[free / 8] |= 1 << (free & 7);
bc->slot = free;
- bl->cachable++;
+ bl->cacheable++;
bl->busy++;
}
typedef struct {
u_char *md5_mask;
char *md5;
- int cachable;
+ int cacheable;
int busy;
int max_busy;
int ngx_http_busy_lock(ngx_http_busy_lock_t *bl, ngx_http_busy_lock_ctx_t *bc);
-int ngx_http_busy_lock_cachable(ngx_http_busy_lock_t *bl,
- ngx_http_busy_lock_ctx_t *bc, int lock);
+int ngx_http_busy_lock_cacheable(ngx_http_busy_lock_t *bl,
+ ngx_http_busy_lock_ctx_t *bc, int lock);
void ngx_http_busy_unlock(ngx_http_busy_lock_t *bl,
ngx_http_busy_lock_ctx_t *bc);
unsigned limit_zone_set:1;
#if 0
- unsigned cachable:1;
+ unsigned cacheable:1;
#endif
unsigned pipeline:1;
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
for (i = 0; i < cmcf->variables.nelts; i++) {
- if (r->variables[i].no_cachable) {
+ if (r->variables[i].no_cacheable) {
r->variables[i].valid = 0;
r->variables[i].not_found = 0;
}
void
-ngx_http_script_flush_no_cachable_variables(ngx_http_request_t *r,
+ngx_http_script_flush_no_cacheable_variables(ngx_http_request_t *r,
ngx_array_t *indices)
{
ngx_uint_t n, *index;
if (indices) {
index = indices->elts;
for (n = 0; n < indices->nelts; n++) {
- if (r->variables[index[n]].no_cachable) {
+ if (r->variables[index[n]].no_cacheable) {
r->variables[index[n]].valid = 0;
r->variables[index[n]].not_found = 0;
}
r->variables[code->index].len = e->sp->len;
r->variables[code->index].valid = 1;
- r->variables[code->index].no_cachable = 0;
+ r->variables[code->index].no_cacheable = 0;
r->variables[code->index].not_found = 0;
r->variables[code->index].data = e->sp->data;
}
ngx_int_t ngx_http_script_compile(ngx_http_script_compile_t *sc);
u_char *ngx_http_script_run(ngx_http_request_t *r, ngx_str_t *value,
void *code_lengths, size_t reserved, void *code_values);
-void ngx_http_script_flush_no_cachable_variables(ngx_http_request_t *r,
+void ngx_http_script_flush_no_cacheable_variables(ngx_http_request_t *r,
ngx_array_t *indices);
void *ngx_http_script_start_code(ngx_pool_t *pool, ngx_array_t **codes,
ev->error = 1;
}
- if (!u->cachable && !u->store && u->peer.connection) {
+ if (!u->cacheable && !u->store && u->peer.connection) {
ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno,
"kevent() reported that client closed prematurely "
"connection, so upstream connection is closed too");
ev->eof = 1;
c->error = 1;
- if (!u->cachable && !u->store && u->peer.connection) {
+ if (!u->cacheable && !u->store && u->peer.connection) {
ngx_log_error(NGX_LOG_INFO, ev->log, err,
"client closed prematurely connection, "
"so upstream connection is closed too");
}
}
- if (u->cachable) {
+ if (u->cacheable) {
header = (ngx_http_cache_header_t *) u->buffer->start;
header->expires = u->cache->ctx.expires;
p->pool = r->pool;
p->log = c->log;
- p->cachable = u->cachable || u->store;
+ p->cacheable = u->cacheable || u->store;
p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t));
if (p->temp_file == NULL) {
p->temp_file->path = u->conf->temp_path;
p->temp_file->pool = r->pool;
- if (u->cachable || u->store) {
+ if (u->cacheable || u->store) {
p->temp_file->persistent = 1;
} else {
p->preread_size = u->buffer.last - u->buffer.pos;
- if (u->cachable) {
+ if (u->cacheable) {
p->buf_to_file = ngx_calloc_buf(r->pool);
if (p->buf_to_file == NULL) {
#if (NGX_HTTP_FILE_CACHE)
- if (p->upstream_done && u->cachable) {
+ if (p->upstream_done && u->cacheable) {
if (ngx_http_cache_update(r) == NGX_ERROR) {
ngx_http_busy_unlock(u->conf->busy_lock, &u->busy_lock);
ngx_http_upstream_finalize_request(r, u, 0);
return;
}
- } else if (p->upstream_eof && u->cachable) {
+ } else if (p->upstream_eof && u->cacheable) {
/* TODO: check length & update cache */
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http upstream downstream error");
- if (!u->cachable && u->peer.connection) {
+ if (!u->cacheable && u->peer.connection) {
ngx_http_upstream_finalize_request(r, u, 0);
}
}
ngx_http_upstream_state_t *state;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
if (r->upstream_states == NULL || r->upstream_states->nelts == 0) {
ngx_http_upstream_state_t *state;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
if (r->upstream_states == NULL || r->upstream_states->nelts == 0) {
ngx_http_upstream_state_t *state;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
if (r->upstream_states == NULL || r->upstream_states->nelts == 0) {
ngx_http_cleanup_pt *cleanup;
unsigned store:1;
- unsigned cachable:1;
+ unsigned cacheable:1;
unsigned accel:1;
unsigned buffering:1;
{ ngx_string("uri"), NULL, ngx_http_variable_request,
offsetof(ngx_http_request_t, uri),
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("document_uri"), NULL, ngx_http_variable_request,
offsetof(ngx_http_request_t, uri),
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("request"), NULL, ngx_http_variable_request,
offsetof(ngx_http_request_t, request_line), 0, 0 },
{ ngx_string("document_root"), NULL,
- ngx_http_variable_document_root, 0, NGX_HTTP_VAR_NOCACHABLE, 0 },
+ ngx_http_variable_document_root, 0, NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("query_string"), NULL, ngx_http_variable_request,
offsetof(ngx_http_request_t, args),
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("args"),
ngx_http_variable_request_set,
ngx_http_variable_request,
offsetof(ngx_http_request_t, args),
- NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("is_args"), NULL, ngx_http_variable_is_args,
- 0, NGX_HTTP_VAR_NOCACHABLE, 0 },
+ 0, NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("request_filename"), NULL,
ngx_http_variable_request_filename, 0,
- NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("server_name"), NULL, ngx_http_variable_request,
offsetof(ngx_http_request_t, server_name), 0, 0 },
{ ngx_string("limit_rate"), ngx_http_variable_request_set_size,
ngx_http_variable_request,
offsetof(ngx_http_request_t, limit_rate),
- NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOCACHABLE, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("nginx_version"), NULL, ngx_http_variable_nginx_version,
0, 0, 0 },
v = key[i].value;
- if (!(v->flags & NGX_HTTP_VAR_CHANGABLE)) {
+ if (!(v->flags & NGX_HTTP_VAR_CHANGEABLE)) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"the duplicate \"%V\" variable", name);
return NULL;
if (v[index].get_handler(r, &r->variables[index], v[index].data)
== NGX_OK)
{
- if (v[index].flags & NGX_HTTP_VAR_NOCACHABLE) {
- r->variables[index].no_cachable = 1;
+ if (v[index].flags & NGX_HTTP_VAR_NOCACHEABLE) {
+ r->variables[index].no_cacheable = 1;
}
return &r->variables[index];
v = &r->variables[index];
if (v->valid) {
- if (!v->no_cachable) {
+ if (!v->no_cacheable) {
return v;
}
if (s->data) {
v->len = s->len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = s->data;
if (h) {
v->len = h->value.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = h->value.data;
}
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
h = a->elts;
if (n + prefix == var->len && n == header[i].key.len) {
v->len = header[i].value.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = header[i].value.data;
}
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
return NGX_OK;
v->len = sizeof(in_addr_t);
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) &sin->sin_addr.s_addr;
{
v->len = r->connection->addr_text.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->connection->addr_text.data;
v->len = 0;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = ngx_palloc(r->pool, sizeof("65535") - 1);
v->len = ngx_inet_ntop(c->listening->family, &r->in_addr,
v->data, INET_ADDRSTRLEN);
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
return NGX_OK;
{
v->len = r->port_text->len - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->port_text->data + 1;
if (r->connection->ssl) {
v->len = sizeof("https") - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) "https";
v->len = sizeof("http") - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) "http";
ngx_http_variable_value_t *v, uintptr_t data)
{
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
if (r->args.len == 0) {
if (clcf->root_lengths == NULL) {
v->len = clcf->root.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = clcf->root.data;
v->len = path.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = path.data;
}
v->len = path.len - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = path.data;
if (r->main->method_name.data) {
v->len = r->main->method_name.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->main->method_name.data;
v->len = r->headers_in.user.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->headers_in.user.data;
v->len = ngx_sprintf(p, "%O", sent) - p;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = p;
if (r->headers_out.content_type.len) {
v->len = r->headers_out.content_type.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->headers_out.content_type.data;
if (r->headers_out.content_length) {
v->len = r->headers_out.content_length->value.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->headers_out.content_length->value.data;
v->len = ngx_sprintf(p, "%O", r->headers_out.content_length_n) - p;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = p;
if (r->headers_out.last_modified) {
v->len = r->headers_out.last_modified->value.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->headers_out.last_modified->value.data;
v->len = ngx_http_time(p, r->headers_out.last_modified_time) - p;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = p;
v->len = len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) p;
v->len = ngx_sprintf(p, "timeout=%T", clcf->keepalive_header) - p;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = p;
if (r->chunked) {
v->len = sizeof("chunked") - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) "chunked";
if (r->request_complete) {
v->len = 2;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) "OK";
v->len = 0;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) "";
v->len = r->request_body->temp_file->file.name.len;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = r->request_body->temp_file->file.name.data;
{
v->len = sizeof(NGINX_VERSION) - 1;
v->valid = 1;
- v->no_cachable = 0;
+ v->no_cacheable = 0;
v->not_found = 0;
v->data = (u_char *) NGINX_VERSION;
if (ngx_strncmp(v[i].name.data, "upstream_http_", 14) == 0) {
v[i].get_handler = ngx_http_upstream_header_variable;
v[i].data = (uintptr_t) &v[i].name;
- v[i].flags = NGX_HTTP_VAR_NOCACHABLE;
+ v[i].flags = NGX_HTTP_VAR_NOCACHEABLE;
continue;
}
ngx_http_variable_value_t *v, uintptr_t data);
-#define NGX_HTTP_VAR_CHANGABLE 1
-#define NGX_HTTP_VAR_NOCACHABLE 2
-#define NGX_HTTP_VAR_INDEXED 4
-#define NGX_HTTP_VAR_NOHASH 8
+#define NGX_HTTP_VAR_CHANGEABLE 1
+#define NGX_HTTP_VAR_NOCACHEABLE 2
+#define NGX_HTTP_VAR_INDEXED 4
+#define NGX_HTTP_VAR_NOHASH 8
struct ngx_http_variable_s {
ngx_int_t type);
static void ngx_start_garbage_collector(ngx_cycle_t *cycle, ngx_int_t type);
static void ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo);
-static ngx_uint_t ngx_reap_childs(ngx_cycle_t *cycle);
+static ngx_uint_t ngx_reap_children(ngx_cycle_t *cycle);
static void ngx_master_process_exit(ngx_cycle_t *cycle);
static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data);
static void ngx_worker_process_init(ngx_cycle_t *cycle, ngx_uint_t priority);
if (ngx_reap) {
ngx_reap = 0;
- ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "reap childs");
+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "reap children");
- live = ngx_reap_childs(cycle);
+ live = ngx_reap_children(cycle);
}
if (!live && (ngx_terminate || ngx_quit)) {
static ngx_uint_t
-ngx_reap_childs(ngx_cycle_t *cycle)
+ngx_reap_children(ngx_cycle_t *cycle)
{
ngx_int_t i, n;
ngx_uint_t live;