Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #9577 --Fixed URL display in the debug template.

Patch from Thomas Güttler.

Backport of r10534 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 95dcf56f4c28ce2f2f4ccf9943ee94c1c0145490 1 parent 6d5f811
Malcolm Tredinnick authored April 12, 2009

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 8  django/views/debug.py
8  django/views/debug.py
@@ -99,7 +99,6 @@ def get_traceback_html(self):
99 99
             'frames': frames,
100 100
             'lastframe': frames[-1],
101 101
             'request': self.request,
102  
-            'request_protocol': self.request.is_secure() and "https" or "http",
103 102
             'settings': get_safe_settings(),
104 103
             'sys_executable': sys.executable,
105 104
             'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
@@ -258,7 +257,6 @@ def technical_404_response(request, exception):
258 257
         'urlpatterns': tried,
259 258
         'reason': smart_str(exception, errors='replace'),
260 259
         'request': request,
261  
-        'request_protocol': request.is_secure() and "https" or "http",
262 260
         'settings': get_safe_settings(),
263 261
     })
264 262
     return HttpResponseNotFound(t.render(c), mimetype='text/html')
@@ -397,7 +395,7 @@ def empty_urlconf(request):
397 395
     </tr>
398 396
     <tr>
399 397
       <th>Request URL:</th>
400  
-      <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
  398
+      <td>{{ request.build_absolute_uri|escape }}</td>
401 399
     </tr>
402 400
     <tr>
403 401
       <th>Exception Type:</th>
@@ -527,7 +525,7 @@ def empty_urlconf(request):
527 525
 Environment:
528 526
 
529 527
 Request Method: {{ request.META.REQUEST_METHOD }}
530  
-Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}
  528
+Request URL: {{ request.build_absolute_uri|escape }}
531 529
 Django Version: {{ django_version_info }}
532 530
 Python Version: {{ sys_version_info }}
533 531
 Installed Applications:
@@ -717,7 +715,7 @@ def empty_urlconf(request):
717 715
       </tr>
718 716
       <tr>
719 717
         <th>Request URL:</th>
720  
-      <td>{{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }}</td>
  718
+      <td>{{ request.build_absolute_uri|escape }}</td>
721 719
       </tr>
722 720
     </table>
723 721
   </div>

0 notes on commit 95dcf56

Please sign in to comment.
Something went wrong with that request. Please try again.