Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: reading from a client after connection upgrade.

Maxim Dounin
February 10, 2014 08:38AM
details: http://hg.nginx.org/nginx/rev/560de9681661
branches: stable-1.4
changeset: 5568:560de9681661
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Jan 22 16:05:07 2014 +0400
description:
Upstream: reading from a client after connection upgrade.

Read event on a client connection might have been disabled during
previous processing, and we at least need to handle events. Calling
ngx_http_upstream_process_upgraded() is a simpliest way to do it.

Notably this change is needed for select, poll and /dev/poll event
methods.

Previous version of this patch was posted here:
http://mailman.nginx.org/pipermail/nginx/2014-January/041839.html

diffstat:

src/http/ngx_http_upstream.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diffs (16 lines):

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
@@ -2459,11 +2459,7 @@ ngx_http_upstream_upgrade(ngx_http_reque
ngx_http_upstream_process_upgraded(r, 1, 1);
}

- if (c->read->ready
- || r->header_in->pos != r->header_in->last)
- {
- ngx_http_upstream_process_upgraded(r, 0, 1);
- }
+ ngx_http_upstream_process_upgraded(r, 0, 1);
}



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

[nginx] Upstream: reading from a client after connection upgrade.

Maxim Dounin 490 February 10, 2014 08:38AM



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

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready