This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Bugfix for incorrect xmlrpclib.Fault representation
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: gavrie, loewis
Priority: normal Keywords: patch

Created on 2003-07-02 09:06 by gavrie, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xmlrpclib.py.patch gavrie, 2003-07-02 09:06 Patch to fix incorrect Fault XML representation
Messages (2)
msg44201 - (view) Author: Gavrie Philipson (gavrie) Date: 2003-07-02 09:06
The xmlrpclib library represents a Fault object with an extraneous 
'args' member field. 
The reason for this is that the dump function blindly marshals all 
variables of the Fault object, and since Fault is a subclass of 
Exception it inherits the 'args' attribute. 
According to the XML-RPC spec, adding additional fields to a Fault 
response is not allowed. 
 
The attached patch is a simple solution to the problem. 
 
Sample Fault XML output that shows the problem: 
 
<?xml version='1.0'?> 
<methodResponse> 
<fault> 
<value><struct> 
<member> 
<name>faultCode</name> 
<value><int>900</int></value> 
</member> 
<member> 
<name>args</name> 
<value><array><data> 
</data></array></value> 
</member> 
<member> 
<name>faultString</name> 
<value><string>boo</string></value> 
</member> 
</struct></value> 
</fault> 
</methodResponse> 
 
msg44202 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-07-12 07:54
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as xmlrpclib.py 1.29 and
1.15.4.1
History
Date User Action Args
2022-04-10 16:09:37adminsetgithub: 38768
2003-07-02 09:06:00gavriecreate