diff options
| -rw-r--r-- | docs/news.txt | 4 | ||||
| -rwxr-xr-x | paste/httpserver.py | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/news.txt b/docs/news.txt index 906f72c..96ff21c 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -11,6 +11,10 @@ svn trunk * Make :mod:`paste.debug.prints` work with Google App Engine. +* Make ``environ['wsgi.input']`` with :mod:`paste.httpserver` only + have a ``seek`` method if it is wrapping something with a seek + method (which usually it is not). + 1.7.1 ----- diff --git a/paste/httpserver.py b/paste/httpserver.py index a4617ff..5ca5956 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -449,6 +449,8 @@ class LimitedLengthFile(object): self.file = file self.length = length self._consumed = 0 + if hasattr(self.file, 'seek'): + self.seek = self._seek def __repr__(self): base_repr = repr(self.file) @@ -491,7 +493,7 @@ class LimitedLengthFile(object): ## Optional methods ## - def seek(self, place): + def _seek(self, place): self.file.seek(place) self._consumed = place |
