changeset 5660:8ed0f132fb44

remove request.in_data, simplifies code (use request.read() for same effect)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 29 Apr 2010 11:42:41 +0200
parents 80a7f3cd237b
children 926f102b4d9c
files MoinMoin/web/contexts.py MoinMoin/web/request.py MoinMoin/xmlrpc/__init__.py
diffstat 3 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/contexts.py	Wed Apr 28 12:29:55 2010 +0200
+++ b/MoinMoin/web/contexts.py	Thu Apr 29 11:42:41 2010 +0200
@@ -227,7 +227,7 @@
     def read(self, n=None):
         """ Read n bytes (or everything) from input stream. """
         if n is None:
-            return self.request.in_data
+            return self.request.in_stream.read()
         else:
             return self.request.in_stream.read(n)
 
--- a/MoinMoin/web/request.py	Wed Apr 28 12:29:55 2010 +0200
+++ b/MoinMoin/web/request.py	Thu Apr 29 11:42:41 2010 +0200
@@ -67,10 +67,6 @@
     # XXX ugly hack end
 
     @cached_property
-    def in_data(self):
-        return self.in_stream.read()
-
-    @cached_property
     def in_headers(self):
         return EnvironHeaders(self.environ)
 
--- a/MoinMoin/xmlrpc/__init__.py	Wed Apr 28 12:29:55 2010 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Thu Apr 29 11:42:41 2010 +0200
@@ -134,7 +134,7 @@
                 # xmlrpc, you have to use multicall and getAuthToken / applyAuthToken
                 request.user = user.User(request, auth_method='xmlrpc:invalid')
 
-                data = request.in_data
+                data = request.read()
 
                 try:
                     params, method = xmlrpclib.loads(data)