aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/core/ngx_connection.h7
-rw-r--r--src/core/ngx_hash.c4
-rw-r--r--src/core/ngx_hash.h2
-rw-r--r--src/core/ngx_output_chain.c8
5 files changed, 18 insertions, 5 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index a15f58e1a..cba4dbb56 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.3.19"
+#define NGINX_VER "nginx/0.3.20"
#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 38a59bcb1..43733aab0 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -93,6 +93,10 @@ typedef enum {
} ngx_connection_tcp_nopush_e;
+#define NGX_LOWLEVEL_BUFFERED 0x0000000f
+#define NGX_SSL_BUFFERED 0x00000001
+
+
struct ngx_connection_s {
void *data;
ngx_event_t *read;
@@ -134,9 +138,10 @@ struct ngx_connection_s {
ngx_atomic_uint_t number;
+ ngx_uint_t buffered;
+
unsigned log_error:2; /* ngx_connection_log_error_e */
- unsigned buffered:1;
unsigned single_connection:1;
unsigned unexpected_eof:1;
unsigned timedout:1;
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c
index 0a1d69d9b..1f677c9fa 100644
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -753,7 +753,9 @@ ngx_hash_add_key(ngx_hash_keys_arrays_t *ha, ngx_str_t *key, void *value,
k = 0;
for (i = 0; i < key->len; i++) {
- key->data[i] = ngx_tolower(key->data[i]);
+ if (!(flags & NGX_HASH_READONLY_KEY)) {
+ key->data[i] = ngx_tolower(key->data[i]);
+ }
k = ngx_hash(k, key->data[i]);
}
diff --git a/src/core/ngx_hash.h b/src/core/ngx_hash.h
index 855dde7c4..ad7343807 100644
--- a/src/core/ngx_hash.h
+++ b/src/core/ngx_hash.h
@@ -61,6 +61,7 @@ typedef struct {
#define NGX_HASH_LARGE_HSIZE 10007
#define NGX_HASH_WILDCARD_KEY 1
+#define NGX_HASH_READONLY_KEY 2
typedef struct {
@@ -114,6 +115,7 @@ ngx_int_t ngx_hash_add_key(ngx_hash_keys_arrays_t *ha, ngx_str_t *key,
void *value, ngx_uint_t flags);
+#define ngx_hash0(key, c) key + c
ngx_int_t ngx_hash0_init(ngx_hash0_t *hash, ngx_pool_t *pool, void *names,
ngx_uint_t nelts);
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index f2dab9c3b..4b8364a69 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -28,9 +28,10 @@ static ngx_int_t ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src,
ngx_int_t
ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
{
- int rc, last;
off_t bsize;
size_t size;
+ ngx_int_t rc, last;
+ ngx_uint_t recycled;
ngx_chain_t *cl, *out, **last_out;
if (ctx->in == NULL && ctx->busy == NULL) {
@@ -131,6 +132,7 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
} else {
size = ctx->bufs.size;
+ recycled = 1;
if (ctx->in->buf->last_in_chain) {
@@ -142,6 +144,7 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
*/
size = (size_t) bsize;
+ recycled = 0;
} else if (ctx->bufs.num == 1
&& (bsize < (off_t) (ctx->bufs.size
@@ -154,6 +157,7 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
*/
size = (size_t) bsize;
+ recycled = 0;
}
}
@@ -163,7 +167,7 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
}
ctx->buf->tag = ctx->tag;
- ctx->buf->recycled = 1;
+ ctx->buf->recycled = recycled;
ctx->allocated++;
}
}