[New-bugs-announce] [issue46738] Allow http.server to emit HTML 5

Tzu-ping Chung report at bugs.python.org
Sun Feb 13 07:57:58 EST 2022


New submission from Tzu-ping Chung <uranusjr at gmail.com>:

Currently, a directory listing page emitted by http.parser uses the HTML 4.01 doctype. While this is perfectly fine for most uses, the server tool is sometimes used for things that require another doctype; PEP 503[1], for example, requires an HTML 5 document.

>From what I can tell, http.parser is already emitting a valid HTML 5 page, so it should be possible to simply change the doctype declaration. Or, if backward compatibility is paramount, this could live behind a --doctype flag as well. If we go the latter route, more doctypes (e.g. XHTML) could potentially be supported as well with minimal modification.

[1]: https://www.python.org/dev/peps/pep-0503/

----------
components: Library (Lib)
messages: 413179
nosy: uranusjr
priority: normal
severity: normal
status: open
title: Allow http.server to emit HTML 5

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46738>
_______________________________________


More information about the New-bugs-announce mailing list