diff options
| author | Georg Brandl <georg@python.org> | 2008-02-23 15:02:28 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2008-02-23 15:02:28 (GMT) |
| commit | 1647923bbf2a0257eefe5f4bbc44bd11e0d63659 (patch) | |
| tree | 463f263bd767fe8379844cdc49ea69012f182ee0 /Doc/library/basehttpserver.rst | |
| parent | 5224d28d38eb784f17c2fed3f48368285df6d17a (diff) | |
| download | cpython-1647923bbf2a0257eefe5f4bbc44bd11e0d63659.zip cpython-1647923bbf2a0257eefe5f4bbc44bd11e0d63659.tar.gz cpython-1647923bbf2a0257eefe5f4bbc44bd11e0d63659.tar.bz2 | |
#1492: allow overriding BaseHTTPServer's content type for error messages.
Diffstat (limited to 'Doc/library/basehttpserver.rst')
| -rw-r--r-- | Doc/library/basehttpserver.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 2e8d6a3..0f058a1 100644 --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -122,6 +122,15 @@ to a handler. Code to create and run the server looks like this:: class variable. +.. attribute:: BaseHTTPRequestHandler.error_content_type + + Specifies the Content-Type HTTP header of error responses sent to the client. + The default value is ``'text/html'``. + + .. versionadded:: 2.6 + Previously, the content type was always ``'text/html'``. + + .. attribute:: BaseHTTPRequestHandler.protocol_version This specifies the HTTP protocol version used in responses. If set to |
