forked from openresty/openresty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-1.0.15-upstream_pipelining.patch
32 lines (25 loc) · 1.22 KB
/
nginx-1.0.15-upstream_pipelining.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff -ur nginx-1.0.15/src/http/ngx_http_upstream.c nginx-1.0.15-patched/src/http/ngx_http_upstream.c
--- nginx-1.0.15/src/http/ngx_http_upstream.c 2011-12-14 02:34:34.000000000 +0800
+++ nginx-1.0.15-patched/src/http/ngx_http_upstream.c 2012-03-21 21:20:17.333111806 +0800
@@ -1385,6 +1385,8 @@
/* rc == NGX_OK */
+ u->request_all_sent = 1;
+
if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
if (ngx_tcp_push(c->fd) == NGX_ERROR) {
ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno,
@@ -1451,7 +1453,7 @@
#endif
- if (u->header_sent) {
+ if (u->request_all_sent) {
u->write_event_handler = ngx_http_upstream_dummy_handler;
(void) ngx_handle_write_event(c->write, 0);
diff -ur nginx-1.0.15/src/http/ngx_http_upstream.h nginx-1.0.15-patched/src/http/ngx_http_upstream.h
--- nginx-1.0.15/src/http/ngx_http_upstream.h 2011-11-01 22:18:10.000000000 +0800
+++ nginx-1.0.15-patched/src/http/ngx_http_upstream.h 2012-03-21 21:18:21.041237173 +0800
@@ -313,6 +313,7 @@
unsigned buffering:1;
unsigned request_sent:1;
+ unsigned request_all_sent:1;
unsigned header_sent:1;
};