Changeset 859
- Timestamp:
- 12/05/05 15:14:59
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (1 diff)
- trunk/docs/book/xml/configreference.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r858 r859 380 380 self.headers = httptools.HeaderMap() 381 381 self.headerMap = self.headers # Backward compatibility 382 content_type = cherrypy.config.get('server.default_content_type', 'text/html') 382 383 self.headers.update({ 383 "Content-Type": "text/html",384 "Content-Type": content_type, 384 385 "Server": "CherryPy/" + cherrypy.__version__, 385 386 "Date": httptools.HTTPDate(), trunk/cherrypy/test/test_core.py
r856 r859 904 904 self.assertEqual(results, ["None"] * 20) 905 905 906 def testDefaultContentType(self): 907 self.getPage('/') 908 self.assertHeader('Content-Type', 'text/html') 909 910 cherrypy.config.update({'server.default_content_type': 'text/plain'}) 911 self.getPage('/') 912 self.assertHeader('Content-Type', 'text/plain') 906 913 907 914 if __name__ == '__main__': trunk/docs/book/xml/configreference.xml
r857 r859 26 26 <para><option>[global] server.max_request_header_size</option>: maximum acceptable size of a request header, in bytes (defaults to 500KB). If a longer request arrives, the server will interrupt it and return a 413 error. This setting is global (ie: doesn't depend on the path). Set it to zero to remove the limit</para> 27 27 </listitem> 28 <listitem> 29 <para><option>[global] server.default_content_type</option>: default content type to be used for all responses (default to text/html). This setting is global (ie: doesn't depend on the path).</para> 30 </listitem> 28 31 <listitem> 29 32 <para><option>[/path] server.max_request_body_size</option>: maximum acceptable size of a request body, in bytes (defaults to 100MB). If a longer request body arrives, the server will interrupt it and return a 413 error. This setting can be configured per path. This is useful to limit the size of uploaded files. Set it to zero to remove the limit</para>

