[asterisk-dev] kpfleming: branch 1.4 r134983 - /branches/1.4/main/http.c

Sergey Tamkovich serg at voipsolutions.ru
Fri Aug 1 02:24:50 CDT 2008


Edwin Groothuis wrote:
> On Thu, Jul 31, 2008 at 09:20:06PM -0500, Russell Bryant wrote:
>   
>>> -		c = ast_http_error(302, "Moved Temporarily", "Location: /static/ 
>>> index.html\r\n", "This is not the page you are looking for...");
>>> +		c = ast_http_error(302, "Moved Temporarily", "Location: /static/ 
>>> index.html\r\n", "Redirecting to /static/index.html.");
>>> 		*status = 302;
>>> 		*title = strdup("Moved Temporarily");
>>>       
>
> Shouldn't that be a full URL in the Location: line?
>
> Edwin
>
>   
According to RFC - yes it should.

14.30 Location

The Location response-header field is used to redirect the recipient to 
a location other than the Request-URI for completion of the request or 
identification of a new resource. For 201 (Created) responses, the 
Location is that of the new resource which was created by the request. 
For 3xx responses, the location SHOULD indicate the server's preferred 
URI for automatic redirection to the resource. The field value consists 
of a single absolute URI.
       Location       = "Location" ":" absoluteURI

An example is:
       Location: http://www.w3.org/pub/WWW/People.html


But i never meet a browser which doesn't process relative URI in Location.



More information about the asterisk-dev mailing list