This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maggyero
Recipients docs@python, maggyero
Date 2022-01-19.17:39:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642613980.51.0.0570385311323.issue46436@roundup.psfhosted.org>
In-reply-to
Content
The API of [`http.server`](https://docs.python.org/3/library/http.server.html) supports the `directory` optional parameter for `CGIHTTPRequestHandler` (which is inherited from `SimpleHTTPRequestHandler`). The CLI of `http.server` supports the corresponding `-d/--directory` option.

The `-d/--directory` option is passed to `SimpleHTTPRequestHandler` as the `directory` argument:

> python -m http.server --directory /tmp/

But the `-d/--directory` option is not passed to `CGIHTTPRequestHandler` (which is enabled with the `--cgi` option):

> python -m http.server --directory /tmp/ --cgi

So the option is ignored in that case.
History
Date User Action Args
2022-01-19 17:39:40maggyerosetrecipients: + maggyero, docs@python
2022-01-19 17:39:40maggyerosetmessageid: <1642613980.51.0.0570385311323.issue46436@roundup.psfhosted.org>
2022-01-19 17:39:40maggyerolinkissue46436 messages
2022-01-19 17:39:40maggyerocreate