[issue7977] I found Python 3.1 xmlrpc lib use "<param>" not properly. and i have fixed it.
Jelly Chen
report at bugs.python.org
Mon Feb 22 12:31:43 CET 2010
Jelly Chen <sinojelly at gmail.com> added the comment:
I can't modify the issue. so i replay this email.
The old xmlrpc lib don't use <param> surround a param. please take a look at
wrong.xml and right.xml.
2010/2/22 Mark Dickinson <report at bugs.python.org>
>
> Mark Dickinson <dickinsm at gmail.com> added the comment:
>
> Please could you generate and upload a patch against the Python source?
> (For Windows, you can do this using the WinMerge tool, amongst others.)
> I'm unable to open the file you attached on my machine:
>
> """No application knows how to open ... xmlrpc.client.modify.rar."""
>
> If you could explain how "<param>" is being used improperly, that might
> also help.
>
> ----------
> nosy: +mark.dickinson
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue7977>
> _______________________________________
>
----------
keywords: +patch
Added file: http://bugs.python.org/file16292/unnamed
Added file: http://bugs.python.org/file16293/xmlrpc.patch
Added file: http://bugs.python.org/file16294/wrong.xml
Added file: http://bugs.python.org/file16295/right.xml
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7977>
_______________________________________
-------------- next part --------------
I can't modify the issue. so i replay this email.<div>The old xmlrpc lib don't use <param> surround a param. please take a look at wrong.xml and right.xml.<br><br><div class="gmail_quote">2010/2/22 Mark Dickinson <span dir="ltr"><<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Mark Dickinson <<a href="mailto:dickinsm at gmail.com">dickinsm at gmail.com</a>> added the comment:<br>
<br>
Please could you generate and upload a patch against the Python source? (For Windows, you can do this using the WinMerge tool, amongst others.) I'm unable to open the file you attached on my machine:<br>
<br>
"""No application knows how to open ... xmlrpc.client.modify.rar."""<br>
<br>
If you could explain how "<param>" is being used improperly, that might also help.<br>
<br>
----------<br>
nosy: +mark.dickinson<br>
<div><div></div><div class="h5"><br>
_______________________________________<br>
Python tracker <<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>><br>
<<a href="http://bugs.python.org/issue7977" target="_blank">http://bugs.python.org/issue7977</a>><br>
_______________________________________<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Contact me: <br>QQ: 2578717<br>MSN: <a href="mailto:sinojelly at msn.cn">sinojelly at msn.cn</a><br>æ°æµªå¾®åï¼<a href="http://t.sina.com.cn/sinojelly">http://t.sina.com.cn/sinojelly</a><br>
æçå客ï¼<a href="http://sinojelly.20x.cc">http://sinojelly.20x.cc</a><br><br><br>
</div>
-------------- next part --------------
diff -Nur xmlrpc\client.py modify\xmlrpc\client.py
--- xmlrpc\client.py Thu Jun 04 17:11:52 2009
+++ modify\xmlrpc\client.py Mon Feb 22 19:13:37 2010
@@ -49,6 +49,7 @@
# 2003-07-12 gp Correct marshalling of Faults
# 2003-10-31 mvl Add multicall support
# 2004-08-20 mvl Bump minimum supported Python version to 2.1
+# 2010-02-22 cgd Reorganize xmlrpc request message format (Chenguodong email:sinojelly at gmail.com)
#
# Copyright (c) 1999-2002 by Secret Labs AB.
# Copyright (c) 1999-2002 by Fredrik Lundh.
@@ -508,9 +509,7 @@
# is for now. See @XMLRPC3 for more information. /F
write("<params>\n")
for v in values:
- write("<param>\n")
dump(v, write)
- write("</param>\n")
write("</params>\n")
result = "".join(out)
return result
@@ -588,13 +587,25 @@
raise TypeError("cannot marshal recursive sequences")
self.memo[i] = None
dump = self.__dump
+ for v in value:
+ write("<param>\n")
+ dump(v, write)
+ write("</param>\n")
+ del self.memo[i]
+ dispatch[tuple] = dump_array
+
+ def dump_list(self, value, write):
+ i = id(value)
+ if i in self.memo:
+ raise TypeError("cannot marshal recursive sequences")
+ self.memo[i] = None
+ dump = self.__dump
write("<value><array><data>\n")
for v in value:
dump(v, write)
write("</data></array></value>\n")
del self.memo[i]
- dispatch[tuple] = dump_array
- dispatch[list] = dump_array
+ dispatch[list] = dump_list
def dump_struct(self, value, write, escape=escape):
i = id(value)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrong.xml
Type: text/xml
Size: 516 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20100222/d77f9e97/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: right.xml
Type: text/xml
Size: 898 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20100222/d77f9e97/attachment-0001.xml>
More information about the Python-bugs-list
mailing list