aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-01-22 16:05:07 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2014-01-22 16:05:07 +0400
commit612f981744dd4eaa9c25542d5485844e5109ce7f (patch)
treeb2d9a8867bb2fbb8ab73bb2b375910429d98561d
parent54316a276d4dd8efab9d4d8fe4154546e3345686 (diff)
downloadnginx-612f981744dd4eaa9c25542d5485844e5109ce7f.tar.gz
nginx-612f981744dd4eaa9c25542d5485844e5109ce7f.zip
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
-rw-r--r--src/http/ngx_http_upstream.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 45e2eb7b9..ffdffcf07 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2459,11 +2459,7 @@ ngx_http_upstream_upgrade(ngx_http_request_t *r, ngx_http_upstream_t *u)
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);
}