Welcome! Log In Create A New Profile

Advanced

[PATCH 2 of 2] Cache: fix sending of stale responses

Maxim Dounin
January 15, 2010 01:30PM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1263576722 -10800
# Node ID 41ddd768a2271c217f40cc2802101a3a8c8de90b
# Parent 065ce686b20763357a61f52f6e4a2e07351fee6b
Cache: fix sending of stale responses.

For stale responses two last buffers were sent, resulting in duplicate
final chunk if chunked encoding was used.

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2950,7 +2950,12 @@ ngx_http_upstream_finalize_request(ngx_h

r->connection->log->action = "sending to client";

- if (rc == 0) {
+ if (rc == 0
+#if (NGX_HTTP_CACHE)
+ && !r->cached
+#endif
+ )
+ {
rc = ngx_http_send_special(r, NGX_HTTP_LAST);
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 2] cache fixes for empty and stale responses

Maxim Dounin 3234 January 15, 2010 01:30PM

[PATCH 1 of 2] Cache: fix sending of empty

Maxim Dounin 1174 January 15, 2010 01:30PM

[PATCH 2 of 2] Cache: fix sending of stale responses

Maxim Dounin 1225 January 15, 2010 01:30PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready