Created
February 9, 2012 08:20
-
-
Save kazeburo/1778392 to your computer and use it in GitHub Desktop.
nginx HTTP/1.0 upstream keepalive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- nginx-1.1.14.orig/src/http/ngx_http_upstream.c 2012-01-19 00:07:43.000000000 +0900 | |
+++ nginx-1.1.14/src/http/ngx_http_upstream.c 2012-02-09 17:11:02.000000000 +0900 | |
@@ -3426,6 +3426,13 @@ | |
r->upstream->headers_in.connection_close = 1; | |
} | |
+ if (ngx_strlcasestrn(h->value.data, h->value.data + h->value.len, | |
+ (u_char *) "keep-alive", 10 - 1) | |
+ != NULL) | |
+ { | |
+ r->upstream->headers_in.connection_close = 0; | |
+ } | |
+ | |
return NGX_OK; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment