Re: Redirects and invalid endpoints
Troy Farrell <[email protected]> Mon, 29 Dec 2008 09:39:04 -0600
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
I would be inclined to return the redirect or define and document an XML-RPC fault code for redirection. The former lets your users take advantage of good client code they may have for automatic redirection. The latter makes them implement redirection, but allows for certainty of client behavior (i.e., it works for the client it implemented - no guessing about it.) Troy [email protected] wrote on 12/24/2008 09:44:15 AM: > On Wed, Dec 24, 2008 at 04:16:22AM -0500, Jay Carlson wrote: > > > > In an ideal world, everybody is using a modern HTTP library that holds > > persistent redirects and cookies and auth and etc before the XML-RPC > > layer gets into action, but I don't think any of the three > > implementations I did got this right. (On the server side, you can > > throw Apache in front of things and get a lot of this handling for > > free, and on the client side browsers do actually have world-class > > HTTP clients.) > > How about in a practical world? ;) I suppose what I return is > whatever I document. So, I'm looking for suggestions. > > In my *web* app some pages require SSL. So, if a non-ssl request > comes in for http://example.com/myprofile and that page requires SSL > then I return a redirect to https://example.com/myprofile. > > It's not unlikely that someone might make that mistake with the > XML-RPC endpoint, too. > > So, just curious what people here would expect as a response to an > invalid scheme on the endpoint. > > Frankly, I'm tempted to return a 404. But, returning a 302 with a > location header might be a bit more helpful. > > -- > Bill Moseley [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/xml-rpc/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/xml-rpc/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/