jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlu...@apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper HttpServletRequestWrapperGetRequestURLTestServlet.java
Date Tue, 12 Feb 2002 13:56:42 GMT
rlubke      02/02/12 05:56:42

  Modified:    src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper
                        HttpServletRequestWrapperGetRequestURLTestServlet.java
  Log:
   - Handle cases where server listens on port 80, and the port number
     is excluded from the actual result.
  
  Revision  Changes    Path
  1.2       +11 -4     jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper/HttpServletRequestWrapperGetRequestURLTestServlet.java
  
  Index: HttpServletRequestWrapperGetRequestURLTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper/HttpServletRequestWrapperGetRequestURLTestServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HttpServletRequestWrapperGetRequestURLTestServlet.java	11 Jan 2002 22:29:16 -0000	1.1
  +++ HttpServletRequestWrapperGetRequestURLTestServlet.java	12 Feb 2002 13:56:42 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper/HttpServletRequestWrapperGetRequestURLTestServlet.java,v
1.1 2002/01/11 22:29:16 rlubke Exp $ 
  - * $Revision: 1.1 $
  - * $Date: 2002/01/11 22:29:16 $
  + * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequestWrapper/HttpServletRequestWrapperGetRequestURLTestServlet.java,v
1.2 2002/02/12 13:56:42 rlubke Exp $ 
  + * $Revision: 1.2 $
  + * $Date: 2002/02/12 13:56:42 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -117,17 +117,24 @@
           if ( ( found1 ) && ( found2 ) && ( found3 ) && ( found4
) ) {
               String expectedResult = prefix + "://" + server + ":" + port + path;
   
  +            // handle cases where server runs on port 80
  +            String expectedResult2 = prefix + "://" + server + path;
  +                
  +
               StringBuffer sresult = request.getRequestURL();
   
               if ( sresult.length() > 0 ) {
                   String result = sresult.toString();
   
  -                if ( result.equals( expectedResult ) ) {
  +                if ( result.equals( expectedResult ) || result.equals( expectedResult2
) ) {
                       out.println( "HttpServletRequestWrapperGetRequestURLTest test PASSED<BR>"
);
                   } else {
                       out.println( "HttpServletRequestWrapperGetRequestURLTest test FAILED
<BR>" );
                       out.println( "	HttpServletRequestWrapper.getRequestURL() returned an
incorrect result <BR>" );
                       out.println( "	Expected value ->|" + expectedResult + "|<BR>"
);
  +                    if ( port.equals( "80" ) ) {
  +                        out.println( " OR Expected value ->|" + expectedResult2 + "|<BR>"
);
  +                    }
                       out.println( "	Actual value ->|" + result + "|" );
                   }
               } else {
  
  
  

--
To unsubscribe, e-mail:   <mailto:watchdog-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>


Mime
View raw message