Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 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 | f6bbe77794aa |
children | c8a14fbd3ce9 |
comparison
equal
deleted
inserted
replaced
5567:5a38f9609d85 | 5568:560de9681661 |
---|---|
2457 || u->buffer.pos != u->buffer.last) | 2457 || u->buffer.pos != u->buffer.last) |
2458 { | 2458 { |
2459 ngx_http_upstream_process_upgraded(r, 1, 1); | 2459 ngx_http_upstream_process_upgraded(r, 1, 1); |
2460 } | 2460 } |
2461 | 2461 |
2462 if (c->read->ready | 2462 ngx_http_upstream_process_upgraded(r, 0, 1); |
2463 || r->header_in->pos != r->header_in->last) | |
2464 { | |
2465 ngx_http_upstream_process_upgraded(r, 0, 1); | |
2466 } | |
2467 } | 2463 } |
2468 | 2464 |
2469 | 2465 |
2470 static void | 2466 static void |
2471 ngx_http_upstream_upgraded_read_downstream(ngx_http_request_t *r) | 2467 ngx_http_upstream_upgraded_read_downstream(ngx_http_request_t *r) |