aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index f3b62d9d4..78c141220 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -783,14 +783,24 @@ ngx_http_handler(ngx_http_request_t *r)
break;
}
- if (r->keepalive && r->headers_in.msie && r->method == NGX_HTTP_POST) {
-
- /*
- * MSIE may wait for some time if an response for
- * a POST request was sent over a keepalive connection
- */
+ if (r->keepalive) {
+
+ if (r->headers_in.msie) {
+ if (r->method == NGX_HTTP_POST) {
+ /*
+ * MSIE may wait for some time if an response for
+ * a POST request was sent over a keepalive connection
+ */
+ r->keepalive = 0;
+ }
- r->keepalive = 0;
+ } 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->headers_in.content_length_n > 0) {