Commit 012c7580 authored by Cristi Vîjdea's avatar Cristi Vîjdea
Browse files

Enable quoting by default

This assumes most people are on nginx versions newer than 1.5.9
parent a8ab309f
Changelog
=========
Changes in x.y (Date TBD)
---------------------------
* Fixed ``X-Accel-Redirect`` non-ascii filename URI encoding compatiblity with ``nginx`` >= 1.5.9.
* the ``PRIVATE_STORAGE_NGINX_VERSION`` is now used to determine proper behaviour, which defaults to assuming >=1.5.9
Changes in 2.1 (2018-05-08)
---------------------------
......
......@@ -217,6 +217,9 @@ The ``PRIVATE_STORAGE_NGINX_VERSION`` setting is used to determine the proper en
header when dealing with non-ascii file names. Specifically, versions starting with ``1.5.9`` expect the value of the
header to be URL encoded, while older versions require the raw/MIME encoded file path.
The default behaviour is to quote the header (nginx >= 1.5.9), so you have to assign this setting if your nginx
version is lower than that.
Other webservers
~~~~~~~~~~~~~~~~
......
......@@ -158,8 +158,8 @@ class NginxXAccelRedirectServer(object):
# versions of Nginx before 1.5.9
return nginx_version >= (1, 5, 9)
# preserve old behaviour by default to avoid breaking compatibility
return False
# nginx 1.5.9 was released in 2014, so just assume most people have that
return True
@staticmethod
@add_no_cache_headers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment