From 1647923bbf2a0257eefe5f4bbc44bd11e0d63659 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 23 Feb 2008 15:02:28 +0000 Subject: #1492: allow overriding BaseHTTPServer's content type for error messages. --- Doc/library/basehttpserver.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Doc/library/basehttpserver.rst') diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 2e8d6a3806..0f058a18e1 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 -- cgit v1.2.1