Changeset 1540
- Timestamp:
- 12/20/06 23:49:52
- Files:
-
- trunk/cherrypy/__init__.py (modified) (1 diff)
- trunk/cherrypy/_cperror.py (modified) (3 diffs)
- trunk/cherrypy/test/test_xmlrpc.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/__init__.py
r1535 r1540 25 25 26 26 def quickstart(root, script_name="", config=None): 27 """Mount the given app, start the engine and builtin server, then block."""27 """Mount the given root, start the engine and builtin server, then block.""" 28 28 if config: 29 29 _global_conf_alias.update(config) trunk/cherrypy/_cperror.py
r1467 r1540 164 164 # Remove headers which applied to the original content, 165 165 # but do not apply to the error page. 166 respheaders = response.headers 166 167 for key in ["Accept-Ranges", "Age", "ETag", "Location", "Retry-After", 167 168 "Vary", "Content-Encoding", "Content-Length", "Expires", 168 169 "Content-Location", "Content-MD5", "Last-Modified"]: 169 if resp onse.headers.has_key(key):170 del resp onse.headers[key]170 if respheaders.has_key(key): 171 del respheaders[key] 171 172 172 173 if self.status != 416: … … 177 178 # A response with status code 206 (Partial Content) MUST NOT 178 179 # include a Content-Range field with a byte-range- resp-spec of "*". 179 if resp onse.headers.has_key("Content-Range"):180 del resp onse.headers["Content-Range"]180 if respheaders.has_key("Content-Range"): 181 del respheaders["Content-Range"] 181 182 182 183 # In all cases, finalize will be called after this method, … … 189 190 message=self.message) 190 191 response.body = content 191 resp onse.headers['Content-Length'] = len(content)192 resp onse.headers['Content-Type'] = "text/html"192 respheaders['Content-Length'] = len(content) 193 respheaders['Content-Type'] = "text/html" 193 194 194 195 _be_ie_unfriendly(self.status) trunk/cherrypy/test/test_xmlrpc.py
r1528 r1540 3 3 import xmlrpclib 4 4 5 from cherrypy import _cpdispatch 5 import cherrypy 6 6 7 7 8 8 def setup_server(): 9 import cherrypy10 9 from cherrypy import _cptools 11 10 … … 61 60 root.xmlrpc = XmlRpc() 62 61 cherrypy.tree.mount(root, config={'/': { 63 'request.dispatch': _cpdispatch.XMLRPCDispatcher(),62 'request.dispatch': cherrypy.dispatch.XMLRPCDispatcher(), 64 63 }}) 65 64 cherrypy.config.update({'environment': 'test_suite'})

