Skip to content

default http content-type #113471

Closed
Closed

Description

@jcomeauictx

Feature or enhancement

Proposal:

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.

python3 -m http.server -b 127.0.0.1 -c 'text/html'

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No previous discussion. This feature should not affect any existing code using the main branch of cpython.

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Dec 25, 2023
  2. jcomeauictx commented on Dec 25, 2023

    @jcomeauictx
    ContributorAuthor

    submitting pull request shortly.

  3. added a commit that references this issue on Dec 25, 2023
  4. jcomeauictx commented on Dec 26, 2023

    @jcomeauictx
    ContributorAuthor
  5. added a commit that references this issue on Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions