diff options
author | Helmut Grohne <helmut@subdivi.de> | 2008-03-28 18:09:44 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2008-03-28 18:09:44 +0100 |
commit | c7d175ab56f9fc7a020d39d7ec2f8f7f0c6ec216 (patch) | |
tree | 21d67e4655d64fa83cd8c165c213a86fa518588e | |
parent | cdf40b62af41540e4c57a2edfa62ea902d5d63d5 (diff) | |
download | wsgitools-c7d175ab56f9fc7a020d39d7ec2f8f7f0c6ec216.tar.gz |
fixed non-fatal bugs
-rw-r--r-- | wsgitools/adapters.py | 2 | ||||
-rw-r--r-- | wsgitools/filters.py | 4 | ||||
-rw-r--r-- | wsgitools/middlewares.py | 2 | ||||
-rw-r--r-- | wsgitools/scgi/forkpool.py | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/wsgitools/adapters.py b/wsgitools/adapters.py index 37e16b8..48a8250 100644 --- a/wsgitools/adapters.py +++ b/wsgitools/adapters.py @@ -1,6 +1,6 @@ __all__ = [] -from filters import CloseableIterator, CloseableList +from wsgitools.filters import CloseableIterator, CloseableList __all__.append("WSGI2to1Adapter") class WSGI2to1Adapter: diff --git a/wsgitools/filters.py b/wsgitools/filters.py index 509ffde..efba982 100644 --- a/wsgitools/filters.py +++ b/wsgitools/filters.py @@ -199,6 +199,7 @@ class RequestLogWSGIFilter(BaseWSGIFilter): """ @type log: file-like """ + BaseWSGIFilter.__init__(self) assert hasattr(log, "write") self.log = log self.time = time.strftime("%d/%b/%Y:%T %z") @@ -268,6 +269,7 @@ class TimerWSGIFilter(BaseWSGIFilter): """ @type pattern: str """ + BaseWSGIFilter.__init__(self) self.pattern = pattern self.start = time.time() def filter_data(self, data): @@ -292,6 +294,7 @@ class EncodeWSGIFilter(BaseWSGIFilter): """ @type charset: str """ + BaseWSGIFilter.__init__(self) self.charset = charset def filter_data(self, data): """BaseWSGIFilter interface @@ -313,6 +316,7 @@ __all__.append("GzipWSGIFilter") class GzipWSGIFilter(BaseWSGIFilter): """Compresses content using gzip.""" def __init__(self): + BaseWSGIFilter.__init__(self) self.compress = False self.sio = None self.gzip = None diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py index 871105c..12d360d 100644 --- a/wsgitools/middlewares.py +++ b/wsgitools/middlewares.py @@ -3,7 +3,7 @@ __all__ = [] import time import sys import cgitb -from filters import CloseableList, CloseableIterator +from wsgitools.filters import CloseableList, CloseableIterator try: import cStringIO as StringIO except ImportError: diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index df92ec3..6d6f5c5 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -15,7 +15,7 @@ class SocketFileWrapper: """internal method for receiving and counting incoming data""" if size is None: data = self.sock.recv() - self.readbytes += len(data) + self.toread -= len(data) return data data = self.sock.recv(size) self.toread -= len(data) |