Welcome! Log In Create A New Profile

Advanced

Re: Latency problem with one browser

All files from this thread

File Name File Size   Posted by Date  
nginx-vs 571 bytes open | download Andrea Soracchi 03/02/2012 Read message
phpfpm-vs.conf 650 bytes open | download Andrea Soracchi 03/02/2012 Read message
fastcgi_params_phpfpm 1.3 KB open | download Andrea Soracchi 03/02/2012 Read message
nginx.conf 1.3 KB open | download Andrea Soracchi 03/02/2012 Read message
php-fpm.conf 3.4 KB open | download Andrea Soracchi 03/02/2012 Read message
Maxim Dounin
March 15, 2012 02:44PM
Hello!

On Sun, Mar 04, 2012 at 10:08:45PM +0100, Piotr Sikora wrote:

> 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;
> + }

I would rather do

--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1493,7 +1493,9 @@ ngx_http_process_user_agent(ngx_http_req
} else if (ngx_strstrn(user_agent, "Chrome/", 7 - 1)) {
r->headers_in.chrome = 1;

- } else if (ngx_strstrn(user_agent, "Safari/", 7 - 1)) {
+ } else if (ngx_strstrn(user_agent, "Safari/", 7 - 1)
+ && ngx_strstrn(user_agent, "Mac OS X", 8 - 1))
+ {
r->headers_in.safari = 1;

} else if (ngx_strstrn(user_agent, "Konqueror", 9 - 1)) {

As the sole purpose of r->headers_in.safari bit is to activate
this particular workaround. Any objections?

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Latency problem with one browser Attachments

Andrea Soracchi March 02, 2012 07:40AM

Re: Latency problem with one browser

Maxim Dounin March 02, 2012 08:10AM

Re[2]: Latency problem with one browser

Max March 02, 2012 08:18AM

Re: Latency problem with one browser

Maxim Dounin March 02, 2012 08:52AM

Re[2]: Latency problem with one browser

Max March 02, 2012 11:30AM

Re: Latency problem with one browser

Piotr Sikora March 02, 2012 11:36AM

Re: Latency problem with one browser

Andrea Soracchi March 02, 2012 10:54AM

Re[2]: Latency problem with one browser

Max March 02, 2012 11:50AM

Re: Latency problem with one browser

Maxim Dounin March 04, 2012 08:00AM

Re: Latency problem with one browser

Piotr Sikora March 04, 2012 08:42AM

Re: Latency problem with one browser

Maxim Dounin March 04, 2012 12:42PM

Re: Latency problem with one browser

Piotr Sikora March 04, 2012 03:36PM

Re: Latency problem with one browser

Piotr Sikora March 04, 2012 04:10PM

Re: Latency problem with one browser

Maxim Dounin March 15, 2012 02:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready