=== added directory 'tests/regressiontests/requests'
=== added file 'tests/regressiontests/requests/__init__.py'
--- tests/regressiontests/requests/__init__.py	1970-01-01 00:00:00 +0000
+++ tests/regressiontests/requests/__init__.py	2007-09-25 01:35:15 +0000
@@ -0,0 +1,3 @@
+"""
+Tests for Django's various Request objects.
+"""

=== added file 'tests/regressiontests/requests/models.py'
--- tests/regressiontests/requests/models.py	1970-01-01 00:00:00 +0000
+++ tests/regressiontests/requests/models.py	2007-09-25 01:35:47 +0000
@@ -0,0 +1,1 @@
+# Need a models module for the test runner.

=== added file 'tests/regressiontests/requests/tests.py'
--- tests/regressiontests/requests/tests.py	1970-01-01 00:00:00 +0000
+++ tests/regressiontests/requests/tests.py	2007-09-25 04:54:20 +0000
@@ -0,0 +1,34 @@
+"""
+>>> from django.http import HttpRequest
+>>> print repr(HttpRequest())
+<HttpRequest
+GET:{},
+POST:{},
+COOKIES:{},
+META:{}>
+
+>>> from django.core.handlers.wsgi import WSGIRequest
+>>> print repr(WSGIRequest({'PATH_INFO': 'bogus', 'REQUEST_METHOD': 'bogus'}))
+<WSGIRequest
+GET:<QueryDict: {}>,
+POST:<QueryDict: {}>,
+COOKIES:{},
+META:{'REQUEST_METHOD': 'bogus', 'PATH_INFO': 'bogus'}>
+
+>>> from django.core.handlers.modpython import ModPythonRequest
+>>> class FakeModPythonRequest(ModPythonRequest):
+...    def __init__(self, *args, **kwargs):
+...        super(FakeModPythonRequest, self).__init__(*args, **kwargs)
+...        self._get = self._post = self._meta = self._cookies = {}
+>>> class Dummy: pass
+...
+>>> req = Dummy()
+>>> req.uri = 'bogus'
+>>> print repr(FakeModPythonRequest(req))
+<ModPythonRequest
+path:bogus,
+GET:{},
+POST:{},
+COOKIES:{},
+META:{}>
+"""

=== modified file 'django/core/handlers/modpython.py'
--- django/core/handlers/modpython.py	2007-09-16 12:10:28 +0000
+++ django/core/handlers/modpython.py	2007-09-25 04:35:41 +0000
@@ -2,7 +2,7 @@
 from django.core import signals
 from django.dispatch import dispatcher
 from django.utils import datastructures
-from django.utils.encoding import force_unicode
+from django.utils.encoding import force_unicode, smart_str
 from django import http
 from pprint import pformat
 import os
@@ -35,8 +35,9 @@
             meta = pformat(self.META)
         except:
             meta = '<could not parse>'
-        return '<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % \
-            (self.path, get, post, cookies, meta)
+        return smart_str(u'<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' %
+                         (self.path, unicode(get), unicode(post),
+                          unicode(cookies), unicode(meta)))
 
     def get_full_path(self):
         return '%s%s' % (self.path, self._req.args and ('?' + self._req.args) or '')

