[SERVLET_SPEC-27] sendRedirect Javadoc prevents use of protocol relative URLs Created: 07/Oct/11  Updated: 19/Jan/12  Resolved: 19/Jan/12

Status: Resolved
Project: servlet-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: markt_asf Assignee: Shing Wai Chan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The Javadoc for sendRedirect() is quite clear that a URL starting with '/' should be treated as relative to the server root. However, that precludes the use of protocol relative URLs that start with '//'. See [1] for details of why these might be useful. While there are clearly arguments for and against protocol relative URLs, I don't think we should preclude their use and therefore the Javadoc for sendRedirect should be amended to allow for them.

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



 Comments   
Comment by Shing Wai Chan [ 19/Jan/12 ]

Sending src/main/java/javax/servlet/http/HttpServletResponse.java
Transmitting file data .
Committed revision 52212.

Generated at Mon Aug 31 06:19:31 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.