summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Sichert <moritz.sichert@googlemail.com>2016-08-11 15:16:46 +0200
committerTim Graham <timograham@gmail.com>2016-08-11 16:36:29 -0400
commitf0bf535f2b6f1691d32107c78cacb6b0fa63fcf2 (patch)
tree5b8a6875d7a01e4c0effc0b3cc515ed7a385bb7d
parentb2fa5312bb1c11db80ad55e3e03b2b834a4a14e6 (diff)
downloaddjango-f0bf535f2b6f1691d32107c78cacb6b0fa63fcf2.tar.gz
[1.9.x] Refs #23960 -- Documented how to restore absolute redirect URLs.
Backport of 08b8c4697112e8dae90e72afc7d85bd31ead0410 from master
-rw-r--r--docs/releases/1.9.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index 19f7795fc4..12d3c67d32 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -792,6 +792,16 @@ no longer include the scheme and domain part of the URLs. For example,
replaced by ``self.assertRedirects(response, '/some-url/')`` (unless the
redirection specifically contained an absolute URL, of course).
+In the rare case that you need the old behavior (discovered with an ancient
+version of Apache with ``mod_scgi`` that interprets a relative redirect as an
+"internal redirect", you can restore it by writing a custom middleware::
+
+ class LocationHeaderFix(object):
+ def process_response(self, request, response):
+ if 'Location' in response:
+ response['Location'] = request.build_absolute_uri(response['Location'])
+ return response
+
Dropped support for PostgreSQL 9.0
----------------------------------