XML-RPC "filter"

Diez B. Roggisch deets at nospam.web.de
Wed Sep 10 17:04:45 EDT 2008


luigi.paioro at gmail.com schrieb:
> On 9 Set, 17:55, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>> I would go for a slightly different approach: make your server have a
>> dispatch-method that delegates the calls to the underlying actual
>> implementation. But *before* that happens, extract the information as
>> above, and either
>>
>>  - prepend it to the argument list
>>
>>  - stuff it into threadlocal variables, and only access these if needed in
>> your implementation.
>>
>> Diez
> 
> Are you suggesting me to overwrite the _dispatch(self, method, params)
> method of SimpleXMLRPCDispatcher? I thought to this possibility, but
> it only accepts "method" and "params" as arguments, so, as far as I
> know, I have no way to get the user and host address to append.
> 
> Perhaps I've misunderstood your suggestion... in that case can you
> post a short example?

Ah, darn. Yes, you are right of course, the information itself is not 
available, as you don't have access to the request. I gotta ponder this 
a bit more.

Diez



More information about the Python-list mailing list