changeset 5568:560de9681661 stable-1.4

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
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 22 Jan 2014 16:05:07 +0400
parents 5a38f9609d85
children 462ae7eedc68
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }