You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/12/22 20:05:49 UTC

DO NOT REPLY [Bug 38012] - CGIServlet redirect

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38012>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38012





------- Additional Comments From bfaist@oneil.com  2005-12-22 20:05 -------
diff of patch

$ diff CGIServlet.java.orig.java org/apache/catalina/servlets/CGIServlet.java
1763a1764
>           boolean isRedirectStatus = false;
1788a1790,1802
>                           // if we received a redirect status and also
received a new location, lets go to it.
>                           if(isRedirectStatus == true &&
header.toLowerCase().equals("location")) {
>                                
response.sendRedirect(response.encodeRedirectURL(value));
>                           }
>                           // if we receive a redirect status (301, 302, 303),
>                           // then set boolean flag so when we get the
location, we can redirect to it.
>                           if(header.toLowerCase().equals("status")) {
>                             
if(value.contains(Integer.toString(HttpServletResponse.SC_MOVED_PERMANENTLY)) ||
>                                
value.contains(Integer.toString(HttpServletResponse.SC_MOVED_TEMPORARILY)) ||
>                                
value.contains(Integer.toString(HttpServletResponse.SC_SEE_OTHER))) {
>                                      isRedirectStatus = true;
>                              }
>                           }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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