]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.1.31-RELEASE import release-0.1.31
authorIgor Sysoev <igor@sysoev.ru>
Mon, 16 May 2005 13:53:20 +0000 (13:53 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 16 May 2005 13:53:20 +0000 (13:53 +0000)
    *) 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; the bug had appeared in 0.1.30.

12 files changed:
docs/xml/nginx/changes.xml
src/core/nginx.h
src/event/ngx_event_openssl.c
src/http/modules/ngx_http_gzip_filter_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/http/ngx_http_copy_filter_module.c
src/http/ngx_http_core_module.c
src/http/ngx_http_postpone_filter_module.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h
src/http/ngx_http_special_response.c
src/http/ngx_http_write_filter_module.c

index 1d401f849bba228023a1d3ad3af8d1d55e4b0e63..2900e2d5b923d5a7c9d14fc778b5257579ef651c 100644 (file)
@@ -9,6 +9,49 @@
 <title lang="en">nginx changelog</title>
 
 
+<changes ver="0.1.31" date="16.05.2005">
+
+<change type="bugfix">
+<para lang="ru">
+ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ SSL ÏÔ×ÅÔ ÍÏÇ ÐÅÒÅÄÁ×ÁÔØÓÑ ÎÅ ÄÏ ËÏÎÃÁ.
+</para>
+<para lang="en">
+the response encrypted by SSL may not transferred complete.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+ÏÛÉÂËÉ ÐÒÉ ÏÂÒÁÂÏÔËÅ SSI × ÏÔ×ÅÔÅ, ÐÏÌÕÞÅÎÎÏÇÏ ÏÔ FastCGI-ÓÅÒ×ÅÒÁ.
+</para>
+<para lang="en">
+errors while processing FastCGI response by SSI.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+ÏÛÉÂËÉ ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ SSI É ÓÖÁÔÉÑ.
+</para>
+<para lang="en">
+errors while using SSI and gzipping.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+ÒÅÄÉÒÅËÔ Ó ËÏÄÏÍ 301 ÐÅÒÅÄÁ×ÁÌÓÑ ÂÅÚ ÔÅÌÁ ÏÔ×ÅÔÁ;
+ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.1.30.
+</para>
+<para lang="en">
+the redirect with the 301 code was transferred without response body;
+bug appeared in 0.1.30.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="0.1.30" date="14.05.2005">
 
 <change type="bugfix">
index dc1e143375a3a794bffcbba53c37595e7769a920..44c870bed03fc03b4543029a561a49a173f34841 100644 (file)
@@ -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"
index 7053fa3892b658c85ff21e61770e467926d47d57..1c0f1485d3ab0b5146b00d16c7dd8d21cb36a075 100644 (file)
@@ -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;
index 1f7c2328cad35fd566be8b236535b13651b5f356..f7cb92c1824766fbb512d421c9757dfd7af7a39a 100644 (file)
@@ -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);
 }
index acaeeeda62e2ae7f584f4e7c517dc855697c564b..2992ff59d17ddfb9a1b9a22634283fef23a0378f 100644 (file)
@@ -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))
index 98579a2c01efa8a220dabbd54324007c1187ec5f..5561134daf341dfdaf0828630eacec7a6b97d7b8 100644 (file)
@@ -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;
index 2a9b3b7e5af8fbe5c0a7220854d86e2dd7963a32..42c8211d1be8e3870f4771fd9e5da607220ea4d8 100644 (file)
@@ -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);
 
index 4f99bc48430406881eaa01141ea7309df4c67809..5c3e2c9c673403ce9ce4fff5fd335e7d41bec326 100644 (file)
@@ -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;
     }
 
index 4cbf9158162f73af04dbbf92e7e65922995b7d5e..37a176a0a3c4f12628e0ee93afdd9c5cb38cf310 100644 (file)
@@ -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
index f05bc1bdd5eb242db96a3aaf80b6f82255338f77..e2f30332204039915349fb80f2dcffa26dfd5d95 100644 (file)
@@ -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;
 
index 5591dbc886d8c003af786c258b62e6245cc575ee..7a341599aade72bbed4512ba034985933ebbc04a 100644 (file)
@@ -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 */
index 2d9db8b550f19460f287e99780e9c310a916c51d..b872f3dd1e81041cb4ec41ba2348873b7dd2b169 100644 (file)
@@ -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;
     }