More Rewrite Request Within SocketServer?
John Abel
jabel at plus.net
Fri May 27 03:51:15 EDT 2005
Paul Rubin wrote:
>John Abel <jabel at plus.net> writes:
>
>
>>OK, I'm guessing what I was after ( see below ) isn't possible. Does
>>anyone know of an easy way of having verify_request inform the request
>>handler of certain events, say client is unauthorised? I thought of
>>having it set a flag, and referring to it from the handler class (
>>self.server.hostAllowed for example ), but that wouldn't work quite
>>right in a threaded server.
>>
>>
>
>I'd think you could do that. Isn't the new thread already started
>when the verify method runs?
>
>
Unfortunately not. verify_request is called before process_request
which launches the thread ( in the ThreadingMixIn version ). Unless I
passed the flag as an argument to the thread, and then had it reset.
Hmmmmm, worth thinking about,
J
More information about the Python-list
mailing list