Changeset 1053
- Timestamp:
- 04/22/06 12:18:36
- Files:
-
- trunk/cherrypy/lib/encodings.py (modified) (1 diff)
- trunk/cherrypy/test/test_decodingencoding_filter.py (modified) (1 diff)
- trunk/cherrypy/test/test_gzip_filter.py (modified) (1 diff)
- trunk/cherrypy/tools.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/encodings.py
r1049 r1053 1 import struct 2 import time 3 import zlib 4 1 5 import cherrypy 2 6 trunk/cherrypy/test/test_decodingencoding_filter.py
r1017 r1053 24 24 'server.log_to_screen': False, 25 25 'server.environment': 'production', 26 ' encoding_filter.on': True,27 ' decoding_filter.on': True26 'tools.encode.on': True, 27 'tools.decode.on': True, 28 28 }) 29 29 trunk/cherrypy/test/test_gzip_filter.py
r1017 r1053 30 30 'server.environment': 'production', 31 31 'server.show_tracebacks': True, 32 ' gzip_filter.on': True,32 'tools.gzip.on': True, 33 33 }, 34 34 '/noshow_stream': {'stream_response': True}, trunk/cherrypy/tools.py
r1052 r1053 4 4 may only offer one if they choose): 5 5 6 Library calls: all tools expose various callables that can be used7 wherever needed. The arguments are straightforward and should be8 d etailed within the docstring.6 Library calls: all tools are callables that can be used wherever needed. 7 The arguments are straightforward and should be detailed within the 8 docstring. 9 9 10 10 Function decorators: if the tool exposes a "wrap" callable, that … … 26 26 27 27 import cherrypy 28 from cherrypy.lib import cptools, static28 from cherrypy.lib import cptools, encodings, static 29 29 30 30 # These modules are themselves Tools … … 97 97 response_headers = Tool('before_finalize', cptools.response_headers) 98 98 virtual_host = Tool('before_request_body', cptools.virtual_host) 99 100 decode = Tool('before_main', encodings.decode) 101 encode = Tool('before_finalize', encodings.encode) 102 gzip = Tool('before_finalize', encodings.gzip) 103 99 104 staticdir = MainTool(static.get_dir) 100 105 staticfile = MainTool(static.get_file)

