Skip to content

Conversation

willstott101
Copy link

@willstott101 willstott101 commented Nov 22, 2016

Follows discussion here: #56

adnrs96 added a commit to adnrs96/django-sendfile that referenced this pull request Apr 12, 2017
In this commit we are adding support for Nginx version older than
1.5.9. This is achieved through conditionally quoting the URL's in
X-Accel-Redirect headers according to compatibility with Nginx.
Since newer versions of Nginx expect URL's in X-Accel-Redirect to
be quoted unlike the versions older that Nginx 1.5.9. In this commit
we start to check the Nginx version using 'nginx -v' and then caching
the result be making use of a decorator. Using this result we decide
whether the outgoing URL should be quoted or not.
Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
adnrs96 added a commit to adnrs96/django-sendfile that referenced this pull request Apr 12, 2017
In this commit we are adding support for Nginx version older than
1.5.9. This is achieved through conditionally quoting the URL's in
X-Accel-Redirect headers according to compatibility with Nginx.
Since newer versions of Nginx expect URL's in X-Accel-Redirect to
be quoted unlike the versions older that Nginx 1.5.9. In this commit
we start to check the Nginx version using 'nginx -v' and then caching
the result be making use of a decorator. Using this result we decide
whether the outgoing URL should be quoted or not.
Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
adnrs96 added a commit to adnrs96/django-sendfile that referenced this pull request Apr 13, 2017
In this commit we are adding support for Nginx version older than
1.5.9. This is achieved through conditionally quoting the URL's in
X-Accel-Redirect headers according to compatibility with Nginx.
Since newer versions of Nginx expect URL's in X-Accel-Redirect to
be quoted unlike the versions older that Nginx 1.5.9. From this commit
onwards we start to expect a 'NGINX_VERSION' config setting to be setup
in the django settings in order to facilitate decision making regarding
quoting URL's. If such a setting is not found we just assume Nginx version
to be greater then 1.5.9 and make decision accordingly and then cache the
decision by making use of a decorator. Using this result we decide whether
the outgoing URL should be quoted or not.
Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
adnrs96 added a commit to adnrs96/django-sendfile that referenced this pull request Apr 13, 2017
In this commit we are adding support for Nginx version older than
1.5.9. This is achieved through conditionally quoting the URL's in
X-Accel-Redirect headers according to compatibility with Nginx.
Since newer versions of Nginx expect URL's in X-Accel-Redirect to
be quoted unlike the versions older that Nginx 1.5.9. From this commit
onwards we start to expect a 'NGINX_VERSION' config setting to be setup
in the django settings in order to facilitate decision making regarding
quoting URL's. If such a setting is not found we just assume Nginx version
to be greater then 1.5.9 and make decision accordingly and then cache the
decision by making use of a decorator. Using this result we decide whether
the outgoing URL should be quoted or not.
Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
adnrs96 added a commit to adnrs96/django-sendfile that referenced this pull request Apr 13, 2017
In this commit we are adding support for Nginx version older than
1.5.9. This is achieved through conditionally quoting the URL's in
X-Accel-Redirect headers according to compatibility with Nginx.
Since newer versions of Nginx expect URL's in X-Accel-Redirect to
be quoted unlike the versions older that Nginx 1.5.9. From this commit
onwards we start to expect a 'NGINX_VERSION' config setting to be setup
in the django settings in order to facilitate decision making regarding
quoting URL's. If such a setting is not found we just assume Nginx version
to be greater then 1.5.9 and make decision accordingly and then cache the
decision by making use of a decorator. Using this result we decide whether
the outgoing URL should be quoted or not.
Fixes: johnsensible#56, johnsensible#58. Closes johnsensible#45.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant