mirror of
https://github.com/python/cpython.git
synced 2026-03-26 06:31:16 +00:00
#1492: allow overriding BaseHTTPServer's content type for error messages.
This commit is contained in:
parent
5224d28d38
commit
1647923bbf
3 changed files with 17 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue