Author vstinner
Recipients matrixise, mdk, vstinner
Date 2016-11-16.00:32:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwYT4D+rkczmjnZkfyuk4XQvcaQ3dNR6en3hQOg7Fq6Lrw@mail.gmail.com>
In-reply-to <1479253572.34.0.244175615501.issue28707@psf.upfronthosting.co.za>
Content
Julien Palard added the comment:
> If we were able to pass an instance of SimpleHTTPRequestHandler instead of its class, we'd be able to give the `directory` to the handler during the `main()`, instead of using with `chdir` and `getcwd` to pass the information in a kind of hidden/side channel.

You may be able to use functools.partial() to pass an additional
parameter to the request handler constructor.

We use something like that in asyncio for protocols.
History
Date User Action Args
2016-11-16 00:32:40vstinnersetrecipients: + vstinner, matrixise, mdk
2016-11-16 00:32:40vstinnerlinkissue28707 messages
2016-11-16 00:32:39vstinnercreate