tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java
Date Tue, 04 Sep 2001 17:49:17 GMT
craigmcc    01/09/04 10:49:17

  Modified:    catalina/src/share/org/apache/catalina/authenticator
                        FormAuthenticator.java
  Log:
  Do not double up query-string based parameters when restoring the original
  request after a form based login.  This was only happening on GET requests
  -- POST requests were (and continue to be) processed correctly.
  
  PR: Bugzilla #3306
  Submitted by:	Vincente Salvador <vincentesalvador@netscape.net>
  
  Revision  Changes    Path
  1.17      +12 -10    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
  
  Index: FormAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- FormAuthenticator.java	2001/08/01 03:04:04	1.16
  +++ FormAuthenticator.java	2001/09/04 17:49:17	1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
1.16 2001/08/01 03:04:04 craigmcc Exp $
  - * $Revision: 1.16 $
  - * $Date: 2001/08/01 03:04:04 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
1.17 2001/09/04 17:49:17 craigmcc Exp $
  + * $Revision: 1.17 $
  + * $Date: 2001/09/04 17:49:17 $
    *
    * ====================================================================
    *
  @@ -88,7 +88,7 @@
    * Authentication, as described in the Servlet API Specification, Version 2.2.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.16 $ $Date: 2001/08/01 03:04:04 $
  + * @version $Revision: 1.17 $ $Date: 2001/09/04 17:49:17 $
    */
   
   public final class FormAuthenticator
  @@ -368,12 +368,14 @@
               request.addLocale((Locale) locales.next());
           }
           request.clearParameters();
  -        Iterator paramNames = saved.getParameterNames();
  -        while (paramNames.hasNext()) {
  -            String paramName = (String) paramNames.next();
  -            String paramValues[] =
  -              (String[]) saved.getParameterValues(paramName);
  -            request.addParameter(paramName, paramValues);
  +        if ("POST".equalsIgnoreCase(saved.getMethod())) {
  +            Iterator paramNames = saved.getParameterNames();
  +            while (paramNames.hasNext()) {
  +                String paramName = (String) paramNames.next();
  +                String paramValues[] =
  +                    (String[]) saved.getParameterValues(paramName);
  +                request.addParameter(paramName, paramValues);
  +            }
           }
           request.setMethod(saved.getMethod());
           request.setQueryString(saved.getQueryString());
  
  
  

Mime
View raw message