GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-113471: Add custom default Content-Type to http.server by jcomeauictx · Pull Request #113475 · python/cpython Conversation
|
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This change need tests.
I am not sure how much useful is this feature. It only allows to override the MIME type of unrecognized types. And would not it be simpler to configure your browser?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…QMpbI.rst Co-authored-by: Serhiy Storchaka <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The feature looks useful to me; I've wanted it once or twice before. However, adding it would be a lot work. Not sure if it's worth your time.
The change needs documentation (in Doc/library/http.server.rst, both for the attribute and CLI option).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@jcomeauictx are you going to continue working on this PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I've forgotten what else needs to be done. And in any case, nobody else seems interested in it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| python -m http.server --default-content-type text/html | ||
|
|
||
| .. versionchanged:: 3.13 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| .. versionchanged:: 3.13 | |
| .. versionchanged:: next |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm interested :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, I'll look into it tomorrow. No idea where to add them, though, or what precisely needs to be tested. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
"move the description of this flag to the right place", what does that
mean? Could you please do it? I just corrected the hyphenation.
…On Sun, Mar 16, 2025 at 6:10 AM donBarbos ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Doc/library/http.server.rst
<#113475 (comment)>:
> +By default, the server uses the MIME type ``'application/octet-stream'`` for
+the ``Content-Type`` header when the content type cannot be guessed from the
+URL's extension (if any). The option ``--default-content-type`` overrides
+this default with one of the user's choosing::
+
+ python -m http.server --default-content-type text/html
+
+.. versionchanged:: next
+ Added the ``--default-content-type`` option.
@jcomeauictx <https://github.com/jcomeauictx> we added usage of ..
option:: directory for CLI flags, we also need to move the description of
this flag to the right place, could you move it? (I also forgot the second
- before default-content-type, please add it :)
—
Reply to this email directly, view it on GitHub
<#113475 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRUXUAWLKM3YQ2WNDDTZL2UVZ5XAVCNFSM6AAAAABYSPI2O6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMOBYGY3DSNJZGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
John Comeau KE5TFZ WSEE965 ***@***.***> ***@***.***>
http://jc.unternet.net/
"A place for everything, and everything all over the place"
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry I can't. I mean move on to the rest options |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, please check that I did it right.
…On Sun, Mar 16, 2025 at 7:59 AM donBarbos ***@***.***> wrote:
Sorry I can't. I mean move on to the rest options
—
Reply to this email directly, view it on GitHub
<#113475 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRUXV7CQROXHJA4WOQ2N32UWGTPAVCNFSM6AAAAABYSPI2O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRXGQ4DKNRZHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: donBarbos]*donBarbos* left a comment (python/cpython#113475)
<#113475 (comment)>
Sorry I can't. I mean move on to the rest options
—
Reply to this email directly, view it on GitHub
<#113475 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABRUXV7CQROXHJA4WOQ2N32UWGTPAVCNFSM6AAAAABYSPI2O6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMRXGQ4DKNRZHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
John Comeau KE5TFZ WSEE965 ***@***.***> ***@***.***>
http://jc.unternet.net/
"A place for everything, and everything all over the place"
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've resolved the merge conflict and pushed some minor docs things.
Should Also,
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think I had a reason to put it in BaseRequestHandler, but it's been a long time and I've moved on to other things. Do what seems best. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Hugo van Kemenade <[email protected]>
There was an error while loading. Please reload this page.
Documentation build overview
8 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.