New submission from samwyse:
The send_error method always sends a Content-Type of 'text/html'. Other
content types are both possible and desirable. For example, someone
writing a REST server might wish to send XML error messages. Following
the example of DEFAULT_ERROR_MESSAGE, I propose adding the following in
the appropriate places:
91a92,94
> # Default error content-type
> DEFAULT_ERROR_TYPE = 'text/html'
>
345c348
< self.send_header("Content-Type", "text/html")
---
> self.send_header("Content-Type", error_message_type)
351a355
> error_message_type = DEFAULT_ERROR_TYPE
----------
messages: 57784
nosy: samwyse
severity: normal
status: open
title: BaseHTTPServer hard-codes Content-Type for error messages
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1492>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com