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: Wed, 18 Jan 2012 21:41:40 +0000

On 18/01/2012 21:25, Shing Wai Chan wrote:
> On 1/14/12 2:33 AM, Mark Thomas wrote:
>> 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
> Can you clarify what "standard" is for protocol relative URLs?

RFC 3986. Section 4.2. Strictly, it should be called a "network-path
reference".

Mark

>
> Shing Wai Chan
>> 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/
>>
>