[Python-Dev] Re: Allow custom headers in `http.server`

2019-10-26 Thread Alex Yursha
I thought about adding it as a command line option when invoked as `python3 -m http.server`. On Sat, Oct 26, 2019, 18:02 Guido van Rossum wrote: > Is this not something you can do yourself by calling send_header() after > calling send_response()? > > On Sat, Oct 26, 2019 at 7:33 AM Alex Yursha

[Python-Dev] Allow custom headers in `http.server`

2019-10-26 Thread Alex Yursha
Hi CPython maintainers, I need to test my CORS setup and looking for a possibility to set a custom *Access-Control-Allow-Origin *header in http.server. As of now, there is no such feature. Are you interested in me writing a patch to contribute a feature of setting custom headers directly to

[Python-Dev] Re: Allow custom headers in `http.server`

2019-10-26 Thread Oleg Broytman
Hello. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there

[Python-Dev] Re: Allow custom headers in `http.server`

2019-10-26 Thread Guido van Rossum
Is this not something you can do yourself by calling send_header() after calling send_response()? On Sat, Oct 26, 2019 at 7:33 AM Alex Yursha wrote: > Hi CPython maintainers, > > I need to test my CORS setup and looking for a possibility to set a custom > *Access-Control-Allow-Origin > *header

[Python-Dev] Re: Allow custom headers in `http.server`

2019-10-26 Thread Kyle Stanley
> Probably python-list/comp.lang.python mailing list/news group is the best place Since this involves a potential suggested change (adding a feature to assign custom headers to http.server), python-ideas or the "Ideas" section of https://discuss.python.org/ would also be appropriate. On Sat, Oct