jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: SERVLET_SPEC-27: sendRedirect Javadoc prevents use of protocol relative URLs

From: Mark Thomas <markt_at_apache.org>
Date: Sat, 14 Jan 2012 10:33:34 +0000

On 13/01/2012 23:02, Shing Wai Chan wrote:
> Hi,
>
> I am looking at
> http://java.net/jira/browse/SERVLET_SPEC-27
> ("sendRedirect Javadoc prevents use of protocol relative URLs")
>
> According to
> http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-switch-between-http-and-https/
>
> ,
> it seems that it tries to workaround an issue in IE.
>
> I am not sure if it is worth to make it as a standard.
>
> Any comments?

Protocol relative redirects are standard. [1] is just one example of
where they might be used. Currently, the wording of the sendRedirect()
Javadoc prevents the use of protocol relative redirects. They may not be
as widely used but they are standard and the Servlet spec should not
prevent their use. The fix is a simple change to the Javadoc.

Mark

[1]
http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-switch-between-http-and-https/