You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 commentedon Dec 25, 2023
submitting pull request shortly.
DRY fix for python#113471
jcomeauictx commentedon Dec 26, 2023
gh-113471: Add custom default Content-Type to http.server (#113475)