mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
added patches for nginx 1.4.1.
This commit is contained in:
40
patches/nginx-1.4.1-upstream_pipelining.patch
Normal file
40
patches/nginx-1.4.1-upstream_pipelining.patch
Normal file
@ -0,0 +1,40 @@
|
||||
diff -rudp nginx-1.4.1/src/http/ngx_http_upstream.c nginx-1.4.1-patched/src/http/ngx_http_upstream.c
|
||||
--- nginx-1.4.1/src/http/ngx_http_upstream.c 2012-08-06 10:34:08.000000000 -0700
|
||||
+++ nginx-1.4.1-patched/src/http/ngx_http_upstream.c 2012-12-05 14:46:41.741173058 -0800
|
||||
@@ -1216,6 +1216,7 @@ ngx_http_upstream_connect(ngx_http_reque
|
||||
}
|
||||
|
||||
u->request_sent = 0;
|
||||
+ u->request_all_sent = 0;
|
||||
|
||||
if (rc == NGX_AGAIN) {
|
||||
ngx_add_timer(c->write, u->conf->connect_timeout);
|
||||
@@ -1418,6 +1419,8 @@ ngx_http_upstream_send_request(ngx_http_
|
||||
|
||||
/* 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,
|
||||
@@ -1484,7 +1487,7 @@ ngx_http_upstream_send_request_handler(n
|
||||
|
||||
#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 -rudp nginx-1.4.1/src/http/ngx_http_upstream.h nginx-1.4.1-patched/src/http/ngx_http_upstream.h
|
||||
--- nginx-1.4.1/src/http/ngx_http_upstream.h 2012-02-13 03:01:58.000000000 -0800
|
||||
+++ nginx-1.4.1-patched/src/http/ngx_http_upstream.h 2012-12-05 14:41:09.763514741 -0800
|
||||
@@ -324,6 +324,7 @@ struct ngx_http_upstream_s {
|
||||
unsigned keepalive:1;
|
||||
|
||||
unsigned request_sent:1;
|
||||
+ unsigned request_all_sent:1;
|
||||
unsigned header_sent:1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user