atom feed14 messages in ru.sysoev.nginxRe: Latency problem with one browser
FromSent OnAttachments
Andrea SoracchiMar 2, 2012 4:38 am.Other, .conf, .Other, 2 more
Maxim DouninMar 2, 2012 5:08 am 
MaxMar 2, 2012 5:15 am 
Maxim DouninMar 2, 2012 5:51 am 
Andrea SoracchiMar 2, 2012 7:52 am 
MaxMar 2, 2012 8:27 am 
Piotr SikoraMar 2, 2012 8:33 am 
MaxMar 2, 2012 8:48 am 
Maxim DouninMar 2, 2012 10:01 am 
Piotr SikoraMar 4, 2012 5:39 am 
Maxim DouninMar 4, 2012 9:40 am 
Piotr SikoraMar 4, 2012 12:35 pm 
Piotr SikoraMar 4, 2012 1:08 pm 
Maxim DouninMar 15, 2012 11:42 am 
Subject:Re: Latency problem with one browser
From:Piotr Sikora (piot@frickle.com)
Date:Mar 4, 2012 1:08:09 pm
List:ru.sysoev.nginx

Hi Maxim,

Restricting the workaround to something like "Safari on Mac OS X" would be fine too, though it's mostly orthogonal to changing the default.

I believe this patch is sufficient.

"Mac OS X" string is present in all affected devices, i.e.: - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) ... - Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) ... - Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) ... - Mozilla/5.0 (iPod; CPU iPhone OS 5_0_1 like Mac OS X) ...

--- src/http/ngx_http_request.c.orig Sun Mar 4 20:53:14 2012 +++ src/http/ngx_http_request.c Sun Mar 4 20:55:36 2012 @@ -1496,6 +1496,10 @@ ngx_http_process_user_agent(ngx_http_request_t *r, ngx } else if (ngx_strstrn(user_agent, "Safari/", 7 - 1)) { r->headers_in.safari = 1;

+ if (ngx_strstrn(user_agent, "Mac OS X", 8 - 1)) { + r->headers_in.safari_osx = 1; + } + } else if (ngx_strstrn(user_agent, "Konqueror", 9 - 1)) { r->headers_in.konqueror = 1; } --- src/http/ngx_http_request.h.orig Sun Mar 4 20:55:38 2012 +++ src/http/ngx_http_request.h Sun Mar 4 20:56:04 2012 @@ -228,6 +228,7 @@ typedef struct { unsigned gecko:1; unsigned chrome:1; unsigned safari:1; + unsigned safari_osx:1; unsigned konqueror:1; } ngx_http_headers_in_t;

--- src/http/ngx_http_core_module.c.orig Sun Mar 4 20:56:25 2012 +++ src/http/ngx_http_core_module.c Sun Mar 4 20:56:42 2012 @@ -1485,7 +1485,7 @@ ngx_http_update_location_config(ngx_http_request_t *r) */ r->keepalive = 0;

- } else if (r->headers_in.safari + } else if (r->headers_in.safari_osx && (clcf->keepalive_disable & NGX_HTTP_KEEPALIVE_DISABLE_SAFARI)) {