diff MoinMoin/support/werkzeug/test.py @ 4614:159902268129

upgraded werkzeug
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 01 Mar 2009 03:18:57 +0100
parents 246ba4eecab2
children c404a1295318
line wrap: on
line diff
--- a/MoinMoin/support/werkzeug/test.py	Sun Mar 01 03:02:57 2009 +0100
+++ b/MoinMoin/support/werkzeug/test.py	Sun Mar 01 03:18:57 2009 +0100
@@ -278,6 +278,7 @@
         self.environ_base = environ_base
         self.environ_overrides = environ_overrides
         self.input_stream = input_stream
+        self.content_length = content_length
         self.closed = False
 
         if data:
@@ -364,7 +365,10 @@
         return self.headers.get('Content-Length', type=int)
 
     def _set_content_length(self, value):
-        self.headers['Content-Length'] = str(value)
+        if value is None:
+            self.headers.pop('Content-Length', None)
+        else:
+            self.headers['Content-Length'] = str(value)
 
     content_length = property(_get_content_length, _set_content_length, doc='''
         The content length as integer.  Reflected from and to the