Commits

Anonymous committed afcfc23

Ticket #38 - Split input and output filters

Comments (0)

Files changed (5)

lib/filter/encodingfilter.py

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 """
 
-from basefilter import BaseFilter
+from basefilter import BaseOutputFilter
 from cherrypy import cpg
 import types
 
-class EncodingFilter(BaseFilter):
+class EncodingFilter(BaseOutputFilter):
     """
     Filter that automatically encodes the response.
     """

lib/filter/generatorfilter.py

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 """
 
-from basefilter import BaseFilter
+from basefilter import BaseOutputFilter
 from cherrypy import cpg
 import types
 
-class GeneratorFilter(BaseFilter):
+class GeneratorFilter(BaseOutputFilter):
     """
     Filter that allows apps to return a generator.
     """

lib/filter/gzipfilter.py

 """
 
 import gzip, StringIO
-from basefilter import BaseFilter
+from basefilter import BaseOutputFilter
 from cherrypy import cpg
 
-class GzipFilter(BaseFilter):
+class GzipFilter(BaseOutputFilter):
     """
     Filter that gzips the response.
     """

lib/filter/logdebuginfofilter.py

 """
 
 import time, StringIO, pickle
-from basefilter import BaseFilter
+from basefilter import BaseInputFilter, BaseOutputFilter
 from cherrypy import cpg
 
-class LogDebugInfoFilter(BaseFilter):
+class LogDebugInfoStartFilter(BaseInputFilter, BaseOutputFilter):
     """
     Filter that adds debug information to the page
     """
 
 # Edit these lines to match your setup
 if sys.platform=="win32":
-    python2[3]['path']="c:\\python\\python.exe"
+    python2[3]['path']="c:\\python23\\python.exe"
     python2[4]['path']="c:\\python24\\python.exe"
 else:
     python2[3]['path']="python2.3"
 #    - test hidden classes
 #    ...
 
-raw_input('hit enter')
+raw_input('hit enter')