Issue35153
Created on 2018-11-03 11:26 by ced, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 10308 | merged | python-dev, 2018-11-03 11:32 | |
| Messages (7) | |||
|---|---|---|---|
| msg329191 - (view) | Author: Cédric Krier (ced) * | Date: 2018-11-03 11:26 | |
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. |
|||
| msg329192 - (view) | Author: Stéphane Wirtel (matrixise) * | Date: 2018-11-03 11:40 | |
Do you have an example where we need to have extra headers? but +1 for the feature, I marked this issue for 3.8 |
|||
| msg329194 - (view) | Author: Stéphane Wirtel (matrixise) * | Date: 2018-11-03 12:01 | |
and could you add some tests for this new feature? Thank you. |
|||
| msg329196 - (view) | Author: Cédric Krier (ced) * | Date: 2018-11-03 12:57 | |
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 |
|||
| msg329197 - (view) | Author: Stéphane Wirtel (matrixise) * | Date: 2018-11-03 13:23 | |
ok +1 for me and I understand the need. But there is no defined experts for the xmlrpc part. We have to wait for a review just for the feature. |
|||
| msg335780 - (view) | Author: Cédric Krier (ced) * | Date: 2019-02-17 16:47 | |
I have another use case to be able to set headers to xmlrpc: http://www.roundup-tracker.org/docs/xmlrpc.html#advanced-python-client-adding-anti-csrf-headers |
|||
| msg335965 - (view) | Author: STINNER Victor (vstinner) * | Date: 2019-02-19 16:18 | |
New changeset beda52ed36e701e45f22903fc4d3bec0d085b25b by Victor Stinner (Cédric Krier) in branch 'master': bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308) https://github.com/python/cpython/commit/beda52ed36e701e45f22903fc4d3bec0d085b25b |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:07 | admin | set | github: 79334 |
| 2019-02-19 16:19:33 | vstinner | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-02-19 16:18:55 | vstinner | set | nosy:
+ vstinner messages: + msg335965 |
| 2019-02-17 16:47:45 | ced | set | messages: + msg335780 |
| 2018-11-03 13:23:57 | matrixise | set | messages: + msg329197 |
| 2018-11-03 12:57:09 | ced | set | messages: + msg329196 |
| 2018-11-03 12:01:45 | matrixise | set | messages: + msg329194 |
| 2018-11-03 11:40:11 | matrixise | set | nosy:
+ matrixise messages:
+ msg329192 |
| 2018-11-03 11:32:49 | python-dev | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9615 |
| 2018-11-03 11:26:11 | ced | create | |