You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2019-02-19.16:19:33.364>created_at=<Date2018-11-03.11:26:11.599>labels= ['3.8', 'type-feature', 'library']
title='Allow to set headers in xmlrpc.client.ServerProxy'updated_at=<Date2019-02-19.16:19:33.364>user='https://github.com/cedk'
If we want to support other authentication method than basic, we need to be able to set headers to the request sent.
I propose to add an argument headers to ServerProxy which is a list of header tuples that will be put as header.
We have a library proteus which uses xmlrpc.client to connect to our server. The server support basic authentication but also session authentication. The session authentication is much faster because the password hash verification is slow by design.
So to be able to use our session authentication method with the library, we need to be able to set our own Authorization header to the ServerProxy. It could be done with a custom Transport class but then we will have to do it twice for Transport and SafeTransport and to replicate the code that select the class out of the uri.
The proposal started from this discussion: https://bugs.tryton.org/issue7783