This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dom1310df
Recipients dom1310df
Date 2022-02-13.08:33:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644741188.03.0.745095490398.issue46736@roundup.psfhosted.org>
In-reply-to
Content
Currently SimpleHTTPRequestHandler.list_directory (which is used with `python3 -m http.server` amongst other things) generates HTML with the doctype:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

i.e. HTML 4.01.


I propose making the generated page HTML 5 instead. The only necessary change is in the doctype; the rest of the page is valid already. HTML 5 has been supported by Chrome, Firefox, Safari and Opera since 2013, and Edge since 2015 so there shouldn't be any issues with browser compatibility.

The generated page has been HTML 4.01 since https://bugs.python.org/issue13295 in 2011, where it was originally proposed to switch to HTML 5.


Switching to HTML 5 would also allow http.server to be used to serve a simple index for pip that's compliant with PEP 503.

There's some discussion in https://github.com/pypa/pip/issues/10825
History
Date User Action Args
2022-02-13 08:33:08dom1310dfsetrecipients: + dom1310df
2022-02-13 08:33:08dom1310dfsetmessageid: <1644741188.03.0.745095490398.issue46736@roundup.psfhosted.org>
2022-02-13 08:33:07dom1310dflinkissue46736 messages
2022-02-13 08:33:07dom1310dfcreate