Allow changing the default mime-type from application/octet-stream, so testing using python -m http.server doesn't automatically download files lacking extensions. Useful for testing with mitmproxy against a fake site copied from the real one.
text/plain is fine if that's what you want. and application/octet-stream is
*still* the default, I haven't changed that. all I changed is the ability
to *set* the default for your particular instantiation of the server, from
the command line. I only gave text/html as an example because that works
for me in my particular application.
Activity
jcomeauictx commented on Dec 25, 2023
submitting pull request shortly.
DRY fix for python#113471
jcomeauictx commented on Dec 26, 2023
gh-113471: Add custom default Content-Type to http.server (#113475)