summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-05-16 13:51:10 +0000
committerJonathan Kolb <jon@b0g.us>2005-05-16 13:51:10 +0000
commit9860c4946ff96bf8284b3c3dcd862f0e1eea5593 (patch)
tree4084e7c3b27e81b3b03b5235324e8ef8686f30ff
parentfabfcb9467f605bb2354fc51349563f102027b1d (diff)
downloadnginx-0.1.31.tar.gz
Changes with nginx 0.1.31 16 May 2005v0.1.31
*) Bugfix: the response encrypted by SSL may not transferred complete. *) Bugfix: errors while processing FastCGI response by SSI. *) Bugfix: errors while using SSI and gzipping. *) Bugfix: the redirect with the 301 code was transferred without response body; bug appeared in 0.1.30.
-rw-r--r--CHANGES12
-rw-r--r--CHANGES.ru14
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/event/ngx_event_openssl.c5
-rw-r--r--src/http/modules/ngx_http_gzip_filter_module.c2
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c6
-rw-r--r--src/http/ngx_http_copy_filter_module.c3
-rw-r--r--src/http/ngx_http_core_module.c2
-rw-r--r--src/http/ngx_http_postpone_filter_module.c2
-rw-r--r--src/http/ngx_http_request.c2
-rw-r--r--src/http/ngx_http_request.h2
-rw-r--r--src/http/ngx_http_special_response.c2
-rw-r--r--src/http/ngx_http_write_filter_module.c13
13 files changed, 43 insertions, 24 deletions
diff --git a/CHANGES b/CHANGES
index 39f86d430..6b8ebf3b2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,16 @@
+Changes with nginx 0.1.31 16 May 2005
+
+ *) Bugfix: the response encrypted by SSL may not transferred complete.
+
+ *) Bugfix: errors while processing FastCGI response by SSI.
+
+ *) Bugfix: errors while using SSI and gzipping.
+
+ *) Bugfix: the redirect with the 301 code was transferred without
+ response body; bug appeared in 0.1.30.
+
+
Changes with nginx 0.1.30 14 May 2005
*) Bugfix: the worker process may got caught in an endless loop if the
diff --git a/CHANGES.ru b/CHANGES.ru
index 77fb73167..4dd8599ac 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,18 @@
+Изменения в nginx 0.1.31 16.05.2005
+
+ *) Исправление: при использовании SSL ответ мог передаваться не до
+ конца.
+
+ *) Исправление: ошибки при обработке SSI в ответе, полученного от
+ FastCGI-сервера.
+
+ *) Исправление: ошибки при использовании SSI и сжатия.
+
+ *) Исправление: редирект с кодом 301 передавался без тела ответа;
+ ошибка появилась в 0.1.30.
+
+
Изменения в nginx 0.1.30 14.05.2005
*) Исправление: при использовании SSI рабочий процесс мог зациклиться.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index dc1e14337..44c870bed 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.1.30"
+#define NGINX_VER "nginx/0.1.31"
#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 7053fa389..1c0f1485d 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -288,8 +288,9 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
return NGX_CHAIN_ERROR;
}
- if (n < 0) {
- n = 0;
+ if (n == NGX_AGAIN) {
+ c->buffered = 1;
+ return in;
}
in->buf->pos += n;
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
index 1f7c2328c..f7cb92c18 100644
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -367,7 +367,7 @@ ngx_http_gzip_header_filter(ngx_http_request_t *r)
r->headers_out.content_length = NULL;
}
- r->filter_need_in_memory = 1;
+ r->main_filter_need_in_memory = 1;
return ngx_http_next_header_filter(r);
}
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index acaeeeda6..2992ff59d 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -321,7 +321,6 @@ ngx_http_ssi_header_filter(ngx_http_request_t *r)
ctx->timefmt.data = (u_char *) "%A, %d-%b-%Y %H:%M:%S %Z";
r->filter_need_in_memory = 1;
- r->filter_ssi_need_in_memory = 1;
if (r->main == NULL) {
r->headers_out.content_length_n = -1;
@@ -464,10 +463,11 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
ngx_memcpy(b, ctx->buf, sizeof(ngx_buf_t));
- b->last_buf = 0;
- b->recycled = 0;
b->pos = ctx->copy_start;
b->last = ctx->copy_end;
+ b->shadow = NULL;
+ b->last_buf = 0;
+ b->recycled = 0;
if (b->in_file) {
if (conf->min_file_chunk < (size_t) (b->last - b->pos))
diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c
index 98579a2c0..5561134da 100644
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -88,7 +88,8 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in)
ngx_http_set_ctx(r, ctx, ngx_http_copy_filter_module);
ctx->sendfile = r->connection->sendfile;
- ctx->need_in_memory = r->filter_need_in_memory;
+ ctx->need_in_memory = r->main_filter_need_in_memory
+ || r->filter_need_in_memory;
ctx->need_in_temp = r->filter_need_temporary;
ctx->pool = r->pool;
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 2a9b3b7e5..42c8211d1 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1023,6 +1023,8 @@ ngx_http_subrequest(ngx_http_request_t *r,
sr->internal = 1;
+ sr->main_filter_need_in_memory = r->main_filter_need_in_memory;
+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http subrequest \"%V\"", uri);
diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c
index 4f99bc484..5c3e2c9c6 100644
--- a/src/http/ngx_http_postpone_filter_module.c
+++ b/src/http/ngx_http_postpone_filter_module.c
@@ -98,7 +98,7 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in)
out = in;
}
- if (out == NULL && r->out == NULL) {
+ if (out == NULL && r->out == NULL && !r->connection->buffered) {
return NGX_OK;
}
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 4cbf91581..37a176a0a 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -384,7 +384,7 @@ void ngx_http_init_request(ngx_event_t *rev)
c->ssl->no_rcv_shut = 1;
}
- r->filter_need_in_memory = 1;
+ r->main_filter_need_in_memory = 1;
}
#endif
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index f05bc1bdd..e2f303322 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -366,8 +366,8 @@ struct ngx_http_request_s {
unsigned closed:1;
unsigned done:1;
+ unsigned main_filter_need_in_memory:1;
unsigned filter_need_in_memory:1;
- unsigned filter_ssi_need_in_memory:1;
unsigned filter_need_temporary:1;
unsigned filter_allow_ranges:1;
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 5591dbc88..7a341599a 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -300,7 +300,7 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
} else if (error < NGX_HTTP_BAD_REQUEST) {
/* 3XX */
- err = error - NGX_HTTP_MOVED_PERMANENTLY;
+ err = error - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_LEVEL_200;
} else if (error < NGX_HTTP_NGX_CODES) {
/* 4XX */
diff --git a/src/http/ngx_http_write_filter_module.c b/src/http/ngx_http_write_filter_module.c
index 2d9db8b55..b872f3dd1 100644
--- a/src/http/ngx_http_write_filter_module.c
+++ b/src/http/ngx_http_write_filter_module.c
@@ -168,17 +168,6 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
return NGX_OK;
}
-#if 0
- /*
- * avoid the output if there are no incoming bufs but there are
- * the postponed requests or data
- */
-
- if (in == NULL && r->postponed) {
- return NGX_OK;
- }
-#endif
-
if (c->write->delayed) {
return NGX_AGAIN;
}
@@ -232,7 +221,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
r->out = chain;
- if (chain || (last && c->buffered)) {
+ if (chain || c->buffered) {
return NGX_AGAIN;
}