Fw: [Zope] xmlrpc redirect response
What do you all think of this? Do redirects ever make sense to an xml-rpc call? In reading the spec it says (in reference to the response status value): "Unless there's a lower-level error, always return 200 OK." Now granted this problem stems from calling a ZMI API through xml-rpc, but for better or for worse, that is the de-facto TTW API into Zope. And since you can't help passing REQUEST and RESPONSE in, you can't stop the redirect by omitting the R/R arguments through xml-rpc. Thoughts anyone? -Casey ----- Original Message ----- From: "Marco Aurelio Catunda Martins" <catunda@embratel.net.br> To: <zope@zope.org> Sent: Saturday, August 31, 2002 5:55 PM Subject: [Zope] xmlrpc redirect response
Hello,
When I try to adding an DTML Document by xmlrpc call the following error appear:
xmlrpclib.ProtocolError: <ProtocolError for localhost:8080/RPC2: 302 Moved Temporarily>
The 302 error code is about redirect response. I think there is no make sense redirect in xmlrpc call, so change zope source. I put the following method at Response class in xmlrpc.py file:
def redirect(self, location, status=302, lock=0): pass
What do you think about it? Is there any problem?
-- Marco Catunda
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Monday 02 Sep 2002 4:30 am, Casey Duncan wrote:
What do you all think of this? Do redirects ever make sense to an xml-rpc call?
In reading the spec it says (in reference to the response status value):
"Unless there's a lower-level error, always return 200 OK."
Now granted this problem stems from calling a ZMI API through xml-rpc, but for better or for worse, that is the de-facto TTW API into Zope.
For a long long time I have been using a patched xmlrpc module which returns the redirect target as an xmlrpc string in this case.
On Tuesday 03 September 2002 03:53 am, Toby Dickenson wrote:
On Monday 02 Sep 2002 4:30 am, Casey Duncan wrote:
What do you all think of this? Do redirects ever make sense to an xml-rpc call?
In reading the spec it says (in reference to the response status value):
"Unless there's a lower-level error, always return 200 OK."
Now granted this problem stems from calling a ZMI API through xml-rpc, but for better or for worse, that is the de-facto TTW API into Zope.
For a long long time I have been using a patched xmlrpc module which returns the redirect target as an xmlrpc string in this case.
This is interesting. Do you ever do anything with the redirect value? -Casey
On Tuesday 03 Sep 2002 3:23 pm, Casey Duncan wrote:
For a long long time I have been using a patched xmlrpc module which returns the redirect target as an xmlrpc string in this case.
This is interesting. Do you ever do anything with the redirect value?
Occasionally yes. I have some object-add methods that automatically choose a unique id, and redirect to a view of the new object. Sometimes it is nice to add an object over xmlrpc, and know where it was added.
participants (3)
-
Casey Duncan -
Dieter Maurer -
Toby Dickenson