[PATCH] allow keep-alive to safari when it's ok
Naoki Hiroshima
n at h7a.org
Fri Feb 11 06:05:57 MSK 2011
Hi,
The workaround for safari/keep-alive issue being introduced by 0.8.33
seems to be way too aggressive. Since it's a POST issue, we should
unwillingly disable keep-alive only when it's POST.
-- @N
$ diff -u src/http/ngx_http_core_module.c~ src/http/ngx_http_core_module.c
--- src/http/ngx_http_core_module.c~ 2010-12-14 10:38:42.000000000 +0000
+++ src/http/ngx_http_core_module.c 2011-02-11 02:55:05.000000000 +0000
@@ -802,11 +802,13 @@
}
} else if (r->headers_in.safari) {
- /*
- * Safari may send a POST request to a closed keepalive
- * connection and stalls for some time
- */
- r->keepalive = 0;
+ if (r->method == NGX_HTTP_POST) {
+ /*
+ * Safari may send a POST request to a closed keepalive
+ * connection and stalls for some time
+ */
+ r->keepalive = 0;
+ }
}
}
More information about the nginx-devel
mailing list