Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Django Private Storage
Commits
012c7580
Commit
012c7580
authored
May 15, 2018
by
Cristi Vîjdea
Browse files
Enable quoting by default
This assumes most people are on nginx versions newer than 1.5.9
parent
a8ab309f
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES.rst
View file @
012c7580
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)
---------------------------
...
...
README.rst
View file @
012c7580
...
...
@@ -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
~~~~~~~~~~~~~~~~
...
...
private_storage/servers.py
View file @
012c7580
...
...
@@ -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
Fals
e
#
nginx 1.5.9 was released in 2014, so just assume most people have that
return
Tru
e
@
staticmethod
@
add_no_cache_headers
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment