Re: [Zope-dev] Fw: [Zope] xmlrpc redirect response

2002-09-03 Thread Dieter Maurer

Casey Duncan writes:
 > What do you all think of this? Do redirects ever make sense to an xml-rpc
 > call?
I do not think so.

If necessary, the call can be wrapped to avoid a redirect.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Fw: [Zope] xmlrpc redirect response

2002-09-03 Thread Toby Dickenson

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.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Fw: [Zope] xmlrpc redirect response

2002-09-03 Thread Casey Duncan

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


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Fw: [Zope] xmlrpc redirect response

2002-09-03 Thread Toby Dickenson

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. 




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Fw: [Zope] xmlrpc redirect response

2002-09-02 Thread Casey Duncan

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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:  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  -  [EMAIL PROTECTED]
> 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 )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )