Opened 9 years ago
Last modified 9 years ago
#774 accepted defect
modern_browser // gecko version overwrites msie version
Reported by: | openid.stackexchange.com/user/e58ad7e4-c803-4f2f-899a-9effcfb76f61 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-module | Version: | 1.4.x |
Keywords: | moder_browser gecko msie version | Cc: | |
uname -a: | Linux [HOSTNAME] 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.4.6 (Ubuntu)
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1) TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module |
Description
I am not sure, if this behavior is still the case in the current version, but it occurs in 1.4 on ubuntu 14.04.
giving the following config:
##########################################
modern_browser gecko 27.0;
modern_browser opera 19.0;
modern_browser safari 8.0;
modern_browser msie 9.0;
modern_browser unlisted;
ancient_browser Links Lynx netscape4;
##########################################
on an IE11 (Win 8) $ancient_browser == 1. I am not sure if its only me, but this seems wrong in my understanding of how the module should work.
This applies for a 'real' IE11, but does not for a spoofed UA (in chromium 46.0.2462.0) of IE10, IE9, IE8, IE7 - so in that case everything works as expected.
Interestingly though the next config:
##########################################
modern_browser gecko 9.0;
modern_browser opera 19.0;
modern_browser safari 8.0;
modern_browser msie 9.0;
modern_browser unlisted;
ancient_browser Links Lynx netscape4;
##########################################
works as expected (in terms of the IE behavior), meaning $ancient_browser != 1. But now I would support older firefox versions - and that is not intended.
The following config also gets $ancient_browser to be != 1
##########################################
modern_browser gecko 9.0;
modern_browser opera 19.0;
modern_browser safari 8.0;
modern_browser msie 12.0;
modern_browser unlisted;
ancient_browser Links Lynx netscape4;
##########################################
_Conclusion_: it looks like the gecko version is overwriting the defined msie version. This does not mean, that its exactly what is happening internally.
Looks like IE11 started to emit different type of User-Agent strings in some cases, http://www.useragentstring.com/pages/Browserlist/ lists two variants:
The first one is expected to be detected as Gecko 11 as it doesn't contain "MSIE 11" in it. Not sure what MSIE team tries to say by using such a User-Agent string.