summaryrefslogtreecommitdiff
path: root/django/http/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/http/request.py')
-rw-r--r--django/http/request.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/http/request.py b/django/http/request.py
index 5c567b9c46..a0bdf49312 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -191,6 +191,9 @@ class HttpRequest:
# Make it an absolute url (but schemeless and domainless) for the
# edge case that the path starts with '//'.
location = '//%s' % self.get_full_path()
+ else:
+ # Coerce lazy locations.
+ location = str(location)
bits = urlsplit(location)
if not (bits.scheme and bits.netloc):
# Handle the simple, most common case. If the location is absolute