Re: Which URI should be persistent when redirects are used?

Alan,

On 29 Sep 2007, at 15:05, Alan Ruttenberg wrote:
> As the different "representations" are served from different URIs,  
> which we can discover, can I assume that a web document can be both  
> a "resource" and a "representation" at the same time?

No. An HTTP redirect always goes to another *resource*, which in turn  
may have representations.

The HTTP status code of the redirect determines the relationship  
between the original resource and the representation we may finally  
get. For example, 302 in response to GET on <foo> means: “I won't  
give you a representation of the resource denoted by <foo>, but you  
may be able to get that representation of <foo> by repeating your  
request at <bar>.”

But these are details that your HTTP client will usually handle for  
you. All you know is that in the end you get a representation of  
<foo>. It does not need to concern you too much that it was retrieved  
from somewhere else.

> An if this is the case, can we therefore conclude, by your  
> instruction, that same document has two URIs, i.e. that URI  
> aliasing is a necessary consequence of content negotiation?

No. An HTTP redirect does not imply that the two URIs are aliases.  
(Obvious counter-example: <foo.html> redirects to variants  
<foo.en.html> or <foo.fr.html>. One is a document available in  
multiple languages. The others are language-specific versions of that  
document. Different resources. Another example would be <weather- 
today> redirecting to <weather-2007-09-27>. Again, different resources.)

This is all basic HTTP.

Best,
Richard



>
> -Alan
>
> On Sep 29, 2007, at 5:20 AM, Xiaoshu Wang wrote:
>
>>
>> Misha,
>>> And what about content negotiation?  The requestor's original URI  
>>> could be redirected to different URIs depending on MIME Type and  
>>> Language.
>>>
>> Content negotiation don't change the URI.  The server returns  
>> different representations for a particular request depending on  
>> the MIME type and q score, but all the representation is under the  
>> same URI.
>>
>> Xiaoshu
>>
>
>
>

Received on Saturday, 29 September 2007 14:35:46 UTC