tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: response.encodeURL("http://localhost:8080") produces an invalid URL?
Date Wed, 29 Jun 2011 16:31:29 GMT
2011/6/29 Erik Bertelsen <bertelsen.erik@gmail.com>:
> 2011/6/29 Konstantin Kolinko <knst.kolinko@gmail.com>:
>
>>
>> From HTTP standpoint it should be http://localhost:8080/ and in my
>> experience browsers add the trailing slash automatically. I have not
>> looked whether the actual HTTP spec is more strict regarding such
>> URLs.
>>
>
> Actually my experience is slightly different, i.e. the HTTP servers
> send a redirect which adds the trailing /.

Redirect is sent for  folder -> folder/, but here we are talking about
server root ('/').

For the server root the request itself should contain "/". That is
taken care by the browser: in an HTTP request, e.g.
GET / HTTP/1.0
 - the requested path cannot be empty, because multiple spaces are
treated as single one.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message