[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple aliases for RESTful URLs
Experience with GData shows that redirects can be troublesome. Some libraries don't handle redirects well, or make assumptions that require workarounds. Our worst issue occurred when AtomPub was combined with authentication protocols that require signing requests. The client had to intercept the redirect and resign the request before issuing it again. Ugly.
Here are my recommendations:
Hope this helps.
- alias URLs are allowed, and should return the resource without redirecting
- each resource should have a cannonical URL
- atom:link@rel=self should always containt the cannonical URL, regardless of what URL was used to retrieve the resource
On Thu, Feb 26, 2009 at 2:28 PM, Joe Cheng <Joe.Cheng@xxxxxxxxxxxxx>
I have no doubt this has been true for a long time with GETs, but
Asbjørn Ulsberg wrote:
> Redirects can be handled pretty much automatically by most HTTP
> libraries these days, so I don't see the big headache.
is it also true for POST/PUT? That means that the data for the
request body must always be provided to the HTTP library in a
form that is seekable, right? Or else the HTTP library must do
its own buffering of the request. The .NET Framework's HTTP
library doesn't handle this situation correctly, at least not in
the version we use--in fact we had to release a hotfix to Windows
Live Writer when Blogger started doing redirects on their AtomPub
I'm not necessarily arguing that redirects are the wrong approach,
just wondering if other HTTP libraries really do better at this
than ours does...
Test driving http://five.sentenc.es/