Re: Disable keep_alive based on specific useragent

2014-11-18 Thread Valentin V. Bartenev
On Tuesday 18 November 2014 07:11:01 mex wrote: > nope, this seems to be a longer-known problem: > > http://forum.nginx.org/read.php?10,233386,template=head > > i (at least) did not got it working, either with "default 300;" > or with > > set katimeout 300; > If a directive supports variables,

Re: Disable keep_alive based on specific useragent

2014-11-18 Thread mex
nope, this seems to be a longer-known problem: http://forum.nginx.org/read.php?10,233386,template=head i (at least) did not got it working, either with "default 300;" or with set katimeout 300; Posted at Nginx Forum: http://forum.nginx.org/read.php?2,254833,254879#msg-254879 _

Re: Disable keep_alive based on specific useragent

2014-11-18 Thread Wandenberg Peixoto
Try to remove the last 's' This should work. map $http_user_agent $katimeout { default 300; } On Tue, Nov 18, 2014 at 2:25 AM, Robert Mueller wrote: > Hi > > Thanks for your responses. Unfortunately, they don't seem to work. > > > and then use the evil IF: > > if ($ios_ua) { > keepa

Re: Disable keep_alive based on specific useragent

2014-11-17 Thread Robert Mueller
Hi Thanks for your responses. Unfortunately, they don't seem to work. > and then use the evil IF: > > if ($ios_ua) { keepalive_timout 0; } This doesn't appear to work. if ($http_user_agent ~ "^iOS/8\.") { keepalive_timeout 0; } nginx: [emerg] "keepalive_timeout" directive is not allowed here

Re: Disable keep_alive based on specific useragent

2014-11-16 Thread B.R.
Hello, ​ On Mon, Nov 17, 2014 at 7:16 AM, mex wrote: > map $http_user_agent $ios8_ua { > default 0; > "YOUR_REGEX_HERE" 1; > } > > and then use the evil IF: > > if ($ios_ua) { > keepalive_timout 0; > } > ​I would do even better by avoiding using 'if'​ ​ at all: map $http_user_

Re: Disable keep_alive based on specific useragent

2014-11-16 Thread mex
Hi Robert, you could probably work around this issues with map / if: map $http_user_agent $ios8_ua { default 0; "YOUR_REGEX_HERE" 1; } and then use the evil IF: if ($ios_ua) { keepalive_timout 0; } http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if http://nginx

Disable keep_alive based on specific useragent

2014-11-16 Thread Robert Mueller
Due to a bug in iOS 8, I want to disable http keep-alive for all iOS 8 useragents for now. https://github.com/AFNetworking/AFNetworking/issues/2314 I can't see a way to do this in nginx at the moment. The docs for keep_alive disable only talk about msie6 and safari. http://nginx.org/en/docs/ht