Mercurial > cpython-lru_cache-weakref
comparison Doc/library/basehttpserver.rst @ 45449:734fc0a19657 legacy-trunk
#1492: allow overriding BaseHTTPServer's content type for error messages.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 23 Feb 2008 15:02:28 +0000 |
| parents | 9e1529bf0442 |
| children | 66c8bd1bedf3 |
comparison
equal
deleted
inserted
replaced
| 45447:393822f2ef90 | 45449:734fc0a19657 |
|---|---|
| 120 message of what occurred, and *explain* should be an explanation of the error | 120 message of what occurred, and *explain* should be an explanation of the error |
| 121 code number. Default *message* and *explain* values can found in the *responses* | 121 code number. Default *message* and *explain* values can found in the *responses* |
| 122 class variable. | 122 class variable. |
| 123 | 123 |
| 124 | 124 |
| 125 .. attribute:: BaseHTTPRequestHandler.error_content_type | |
| 126 | |
| 127 Specifies the Content-Type HTTP header of error responses sent to the client. | |
| 128 The default value is ``'text/html'``. | |
| 129 | |
| 130 .. versionadded:: 2.6 | |
| 131 Previously, the content type was always ``'text/html'``. | |
| 132 | |
| 133 | |
| 125 .. attribute:: BaseHTTPRequestHandler.protocol_version | 134 .. attribute:: BaseHTTPRequestHandler.protocol_version |
| 126 | 135 |
| 127 This specifies the HTTP protocol version used in responses. If set to | 136 This specifies the HTTP protocol version used in responses. If set to |
| 128 ``'HTTP/1.1'``, the server will permit HTTP persistent connections; however, | 137 ``'HTTP/1.1'``, the server will permit HTTP persistent connections; however, |
| 129 your server *must* then include an accurate ``Content-Length`` header (using | 138 your server *must* then include an accurate ``Content-Length`` header (using |
