diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index b1e3e17..5d7d78e 100644
a
|
b
|
class ModPythonRequest(http.HttpRequest):
|
38 | 38 | self._post_parse_error = False |
39 | 39 | |
40 | 40 | def __repr__(self): |
41 | | # Since this is called as part of error handling, we need to be very |
42 | | # robust against potentially malformed input. |
43 | | try: |
44 | | get = pformat(self.GET) |
45 | | except: |
46 | | get = '<could not parse>' |
47 | | if self._post_parse_error: |
48 | | post = '<could not parse>' |
49 | | else: |
50 | | try: |
51 | | post = pformat(self.POST) |
52 | | except: |
53 | | post = '<could not parse>' |
54 | | try: |
55 | | cookies = pformat(self.COOKIES) |
56 | | except: |
57 | | cookies = '<could not parse>' |
58 | | try: |
59 | | meta = pformat(self.META) |
60 | | except: |
61 | | meta = '<could not parse>' |
62 | | return smart_str(u'<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % |
63 | | (self.path, unicode(get), unicode(post), |
64 | | unicode(cookies), unicode(meta))) |
| 41 | return smart_str(u'<ModPythonRequest: %s %s>' % (self.method, self.get_full_path())) |
65 | 42 | |
66 | 43 | def get_full_path(self): |
67 | 44 | # RFC 3986 requires self._req.args to be in the ASCII range, but this |
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 927b098..3c8ab3b 100644
a
|
b
|
class WSGIRequest(http.HttpRequest):
|
95 | 95 | self._post_parse_error = False |
96 | 96 | |
97 | 97 | def __repr__(self): |
98 | | # Since this is called as part of error handling, we need to be very |
99 | | # robust against potentially malformed input. |
100 | | try: |
101 | | get = pformat(self.GET) |
102 | | except: |
103 | | get = '<could not parse>' |
104 | | if self._post_parse_error: |
105 | | post = '<could not parse>' |
106 | | else: |
107 | | try: |
108 | | post = pformat(self.POST) |
109 | | except: |
110 | | post = '<could not parse>' |
111 | | try: |
112 | | cookies = pformat(self.COOKIES) |
113 | | except: |
114 | | cookies = '<could not parse>' |
115 | | try: |
116 | | meta = pformat(self.META) |
117 | | except: |
118 | | meta = '<could not parse>' |
119 | | return '<WSGIRequest\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % \ |
120 | | (get, post, cookies, meta) |
| 98 | return '<WSGIRequest: %s %s>' % (self.method, self.get_full_path()) |
121 | 99 | |
122 | 100 | def get_full_path(self): |
123 | 101 | # RFC 3986 requires query string arguments to be in the ASCII range. |
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 683212f..6edf838 100644
a
|
b
|
class HttpRequest(object):
|
38 | 38 | self.method = None |
39 | 39 | |
40 | 40 | def __repr__(self): |
41 | | return '<HttpRequest\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % \ |
42 | | (pformat(self.GET), pformat(self.POST), pformat(self.COOKIES), |
43 | | pformat(self.META)) |
| 41 | return '<HttpRequest: %s %s>' % (self.method, self.get_full_path()) |
44 | 42 | |
45 | 43 | def get_host(self): |
46 | 44 | """Returns the HTTP host using the environment or request headers.""" |