Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??
Alan Milligan wrote at 2004-10-13 11:31 +1000: ... I appreciate that supporting 'unofficial' extensions to protocols is not something we want to encourage, but is there any chance of getting this patch into zope core (ever)? I hope not... -- Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??
Hi, Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. The problem would appear to be that it's not substituting the xmlrpc.Response class for a GET request on a text/xml content type and therefore just delegating to the str() function instead of wrapping it in the xml-rpc xml response tags. I'm a little confused about this, as this only appears to happen in HTTPRequest::processInputs which didn't seem to be invoked for my xml-rpc call anyway ... tcpdump follows for the sceptics ... j.. 08:05:04.901469 IP mistress.balclutha.org.34257 mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767 nop,nop,timestamp 225097763 225097723 [EMAIL PROTECTED]@.)..W.x... j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1 Host: localhost:8080 Accept-Encoding: identity x-client-version: 1 x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 1.40) x-up2date-version: user-agent: rhn.rpclib.py/$Revision: 1.40 $ x-rhn-transport-capability: follow-redirects=1 x-rhn-auth-channels: ['mail', '1'] content-type: text/xml x-info: RPC Processor (C) Red Hat, Inc (version 1.44) Your log is a bit confusing maybe you better use tcpflow for dumping. But what is clearly seen is the GET request. I wonder how this ever was supposed to work since XML-RPC requires an entidy body for the message (which is in XML). You can compare with RFC2616 - there is no entidy body in GET. Your client needs to use POST. I suspect then it should work. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??
Heh, Yes - would you like to lobby RedHat to change their up2date client?? I think the reason they've done this is because it's much more efficient. Not only do they not have to read the body, they don't have to parse it. Also, xml-rpc is totally screwed because it doesn't have a file type, and the normal binary limitation is 8192 bytes of parsable data between two tags :( Alan Hi, Am Di, den 12.10.2004 schrieb Alan Milligan um 0:16: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. The problem would appear to be that it's not substituting the xmlrpc.Response class for a GET request on a text/xml content type and therefore just delegating to the str() function instead of wrapping it in the xml-rpc xml response tags. I'm a little confused about this, as this only appears to happen in HTTPRequest::processInputs which didn't seem to be invoked for my xml-rpc call anyway ... tcpdump follows for the sceptics ... j.. 08:05:04.901469 IP mistress.balclutha.org.34257 mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767 nop,nop,timestamp 225097763 225097723 [EMAIL PROTECTED]@.)..W.x... j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1 Host: localhost:8080 Accept-Encoding: identity x-client-version: 1 x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 1.40) x-up2date-version: user-agent: rhn.rpclib.py/$Revision: 1.40 $ x-rhn-transport-capability: follow-redirects=1 x-rhn-auth-channels: ['mail', '1'] content-type: text/xml x-info: RPC Processor (C) Red Hat, Inc (version 1.44) Your log is a bit confusing maybe you better use tcpflow for dumping. But what is clearly seen is the GET request. I wonder how this ever was supposed to work since XML-RPC requires an entidy body for the message (which is in XML). You can compare with RFC2616 - there is no entidy body in GET. Your client needs to use POST. I suspect then it should work. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: | |I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. | |The problem would appear to be that it's not substituting the |xmlrpc.Response class for a GET request on a text/xml content type and |therefore just delegating to the str() function instead of wrapping it |in the xml-rpc xml response tags. | | I wonder how this ever was supposed to work since | XML-RPC requires an entidy body for the message (which is | in XML). You can compare with RFC2616 - there is no | entidy body in GET. Your client needs to use POST. | I suspect then it should work. | Ok, I now more fully understand the subtlety of this explanation. What happened here is that in cgi.py's FieldStorage class, since this is a GET request, it completely ignores the CONTENT_TYPE environment and sets the content-type header to x-www-form-urlencoded. According to Dave Winer's spec at http://www.xmlrpc.com/spec, XML-RPC is supposed to be HTTP-POST based, where this issue is fully resolved. I have implemented this GET 'Extension' with this patch. I appreciate that supporting 'unofficial' extensions to protocols is not something we want to encourage, but is there any chance of getting this patch into zope core (ever)? Cheers, Alan -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBbIWLCfroLk4EZpkRAlX3AKDI5Cdb6CUfdkqtSrEllfZeEGEnMwCdHJN0 78EIcOvXOD2H4imuI2NQOxw= =H+yj -END PGP SIGNATURE- --- HTTPRequest.py 2004-10-13 11:22:32.212653472 +1000 +++ HTTPRequest.py.orig 2004-10-13 11:20:51.146017936 +1000 @@ -385,11 +385,9 @@ fs=FieldStorage(fp=fp,environ=environ,keep_blank_values=1) if not hasattr(fs,'list') or fs.list is None: # Hm, maybe it's an XML-RPC -if ((fs.headers.has_key('content-type') and - fs.headers['content-type'] == 'text/xml' and - method == 'POST') or - (environ.get('CONTENT_TYPE','') == 'text/xml' and - method == 'GET')): +if (fs.headers.has_key('content-type') and +fs.headers['content-type'] == 'text/xml' and +method == 'POST'): # Ye haaa, XML-RPC! global xmlrpc if xmlrpc is None: import xmlrpc ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??
Hi, Am Mi, den 13.10.2004 schrieb Alan Milligan um 3:31: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: | |I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. | |The problem would appear to be that it's not substituting the |xmlrpc.Response class for a GET request on a text/xml content type and |therefore just delegating to the str() function instead of wrapping it |in the xml-rpc xml response tags. | | I wonder how this ever was supposed to work since | XML-RPC requires an entidy body for the message (which is | in XML). You can compare with RFC2616 - there is no | entidy body in GET. Your client needs to use POST. | I suspect then it should work. | Ok, I now more fully understand the subtlety of this explanation. What happened here is that in cgi.py's FieldStorage class, since this is a GET request, it completely ignores the CONTENT_TYPE environment and sets the content-type header to x-www-form-urlencoded. According to Dave Winer's spec at http://www.xmlrpc.com/spec, XML-RPC is supposed to be HTTP-POST based, where this issue is fully resolved. I have implemented this GET 'Extension' with this patch. I appreciate that supporting 'unofficial' extensions to protocols is not something we want to encourage, but is there any chance of getting this patch into zope core (ever)? -1 by me. Go and fix the broken client instead. I wonder who came to such a crazy idea to even think about sending a body with GET. Regards Tino ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3 ??
According to the CHANGES.txt there were no changes to XMLRPC. xmlrpclib.py was removed before 2.7 final because it is part of the Python distro. Looking at your debug output I have no idea what it will show us. Andreas --On Dienstag, 12. Oktober 2004 8:16 Uhr +1000 Alan Milligan [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I had a client that used to work on 2.7.0, and now doesn't on 2.7.3. The problem would appear to be that it's not substituting the xmlrpc.Response class for a GET request on a text/xml content type and therefore just delegating to the str() function instead of wrapping it in the xml-rpc xml response tags. I'm a little confused about this, as this only appears to happen in HTTPRequest::processInputs which didn't seem to be invoked for my xml-rpc call anyway ... tcpdump follows for the sceptics ... j.. 08:05:04.901469 IP mistress.balclutha.org.34257 mistress.balclutha.org.zope: P 1:456(455) ack 1 win 32767 nop,nop,timestamp 225097763 225097723 [EMAIL PROTECTED]@.)..W.x... j..GET /last-bastion.net/junk/rpm/RPC2/$RHN/mail/listPackages/1 HTTP/1.1 Host: localhost:8080 Accept-Encoding: identity x-client-version: 1 x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc (version 1.40) x-up2date-version: user-agent: rhn.rpclib.py/$Revision: 1.40 $ x-rhn-transport-capability: follow-redirects=1 x-rhn-auth-channels: ['mail', '1'] content-type: text/xml x-info: RPC Processor (C) Red Hat, Inc (version 1.44) 08:05:04.901498 IP mistress.balclutha.org.zope mistress.balclutha.org.34257: . ack 456 win 32767 nop,nop,timestamp 225097763 225097763 [EMAIL PROTECTED]@.x.W. j.# 08:05:04.910507 IP mistress.balclutha.org.zope mistress.balclutha.org.34257: P 1:871(870) ack 456 win 32767 nop,nop,timestamp 225097772 225097763 [EMAIL PROTECTED]@..x.W. j.#HTTP/1.1 200 OK Server: Zope/(Zope 2.7.3b1-0, python 2.3.3, linux2) ZServer/1.1 Plone/2.0.4 Date: Mon, 11 Oct 2004 22:05:04 GMT Content-Length: 690 Content-Type: text/plain [['EnchantMail', '2.0.0', '4', '', 'i386', '121577', 'mail'], ['courier', '0.47', '1', '', 'i386', '4172641', 'mail'], ['courier-imapd', '0.47', '1', '', 'i386', '400894', 'mail'], ['courier-ldap', '0.47', '1', '', 'i386', '109401', 'mail'], ['courier-maildrop', '0.47', '1', '', 'i386', '1178663', 'mail'], ['courier-maildrop-wrapper', '0.47', '1', '', 'i386', '0', 'mail'], ['courier-mlm', '0.47', '1', '', 'i386', '250756', 'mail'], ['courier-pop3d', '0.47', '1', '', 'i386', '115327', 'mail'], ['courier-smtpauth', '0.47', '1', '', 'i386', '257063', 'mail'], ['courier-webadmin', '0.47', '1', '', ~ 'i386', '22047', 'mail'], ['courier-webmail', '0.47', '1', '', 'i386', '970798', 'mail']]08:05:04.910534 IP mistress.balclutha.org.34257 mistress.balclutha.org.zope: . ack 871 win 32767 nop,nop,timestamp 225097772 225097772 [EMAIL PROTECTED]@.+..W...Y. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBawY2CfroLk4EZpkRAmtFAKDVLmORsmw6LacIUizLNn111t1J+wCffq7w 3Pbm2RrCvIFKlkxuUg1BDaA= =MbC0 -END PGP SIGNATURE- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3= ??
According to the CHANGES.txt there were no changes to XMLRPC. xmlrpc.py is not faulty, it's just that an HTTPResponse object is assigned to the text/xml content type rather than the correct xmlrpc.Request :( ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: Re: [Zope-dev] xml-rpc changes between 2.7.0 and 2.7.3==20??
I suggest to look at the cvs log output for that particular file to find something. -aj --On Dienstag, 12. Oktober 2004 5:23 Uhr + Alan Milligan [EMAIL PROTECTED] wrote: According to the CHANGES.txt there were no changes to XMLRPC. xmlrpc.py is not faulty, it's just that an HTTPResponse object is assigned to the text/xml content type rather than the correct xmlrpc.Request :( ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )