cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2003-02-16 Thread larryi
larryi  2003/02/16 14:23:08

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Update test to reflect new behavior for trailing /. and /foo/...
  
  Revision  ChangesPath
  1.54  +3 -6  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- test-tomcat.xml   27 Apr 2002 01:44:11 -  1.53
  +++ test-tomcat.xml   16 Feb 2003 22:23:08 -  1.54
  @@ -1252,15 +1252,12 @@
 httpClient unless=not.standalone 
 httpRequest path=/test/jsp/ShowPathInfo.jsp/. 
  method=GET /
  -  httpStatusMatch match=200/
  -  responseMatch match=getRequestURI: /test/jsp/ShowPathInfo.jsp/
  +  httpStatusMatch match=404/
 /httpClient
 httpClient unless=not.standalone 
 httpRequest path=/test/jsp/ShowPathInfo.jsp/foo/.. 
  method=GET /
  -  httpStatusMatch match=200/
  -  responseMatch match=getRequestURI: /test/jsp/ShowPathInfo.jsp/
  -  responseMatch match=getPathInfo: null/
  +  httpStatusMatch match=404/
 /httpClient
 httpClient 
 httpRequest path=/test/ShowPathInfo.jsp/./ 
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2002-04-18 Thread keith

keith   02/04/18 06:58:01

  Modified:.README RELEASE-NOTES-3.3.2.txt build.xml
   src/admin index.html
   src/build/nightly start_tomcat.sh stop_tomcat.sh
   src/build/pkg prototype tomcat.spec
   src/doc  readme serverxml.html tomcat-security.html
tomcat-ssl-howto.html tomcat-ug.html
   src/doc/appdev processes.html
   src/native/mod_jk README
   src/shell jspc.sh shutdown.sh startup.sh tomcat.sh
   src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Remove '.sh' extensions from shell scripts (in the build).
  Update references.
  
  Revision  ChangesPath
  1.20  +10 -10jakarta-tomcat/README
  
  Index: README
  ===
  RCS file: /home/cvs/jakarta-tomcat/README,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- README24 Feb 2002 03:50:14 -  1.19
  +++ README18 Apr 2002 13:57:59 -  1.20
  @@ -60,13 +60,13 @@
 This version can be executed as follows:
   
cd $JAKARTA_HOME/jakarta-tomcat/build/tomcat
  - ./bin/startup.sh-- Unix
  + ./bin/startup   -- Unix
bin\startup -- Windows
   
 and it can be shut down as follows:
   
cd $JAKARTA_HOME/jakarta-tomcat/build/tomcat
  - ./bin/shutdown.sh   -- Unix
  + ./bin/shutdown  -- Unix
bin\shutdown-- Windows
   
   * You can also build a binary distribution version of Tomcat as follows:
  @@ -95,7 +95,7 @@
   * To start Tomcat, execute the following commands:
   
cd $JAKARTA_HOME/jakarta-tomcat/build/tomcat
  - ./bin/startup.sh-- Unix
  + ./bin/startup   -- Unix
bin\startup -- Windows
   
   * You can now access the default web pages from a web browser at URL:
  @@ -105,7 +105,7 @@
   * To stop Tomcat, execute the following commands:
   
cd $JAKARTA_HOME/jakarta-tomcat/build/tomcat
  - ./bin/shutdown.sh   -- Unix
  + ./bin/shutdown  -- Unix
bin\shutdown-- Windows
   
   You can run the distribution version of Tomcat as follows:
  @@ -113,7 +113,7 @@
   * To start Tomcat, execute the following commands:
   
cd $JAKARTA_HOME/jakarta-tomcat/dist/tomcat
  - ./bin/startup.sh-- Unix
  + ./bin/startup   -- Unix
bin\startup -- Windows
   
   * You can now access the default web pages from a web browser at URL:
  @@ -123,7 +123,7 @@
   * To stop Tomcat, execute the following commands:
   
cd $JAKARTA_HOME/jakarta-tomcat/dist/tomcat
  - ./bin/shutdown.sh   -- Unix
  + ./bin/shutdown  -- Unix
bin\shutdown-- Windows
   
   Alternatively, you can run Tomcat without changing your current working
  @@ -133,12 +133,12 @@
   $JAKARTA_HOME/jakarta-tomcat/dist/tomcat).  Now, you can start Tomcat
   as follows:
   
  - $TOMCAT_HOME/bin/startup.sh -- Unix
  + $TOMCAT_HOME/bin/startup-- Unix
%TOMCAT_HOME%\bin\startup   -- Windows
   
   and shut it down likewise:
   
  - $TOMCAT_HOME/bin/shutdown.sh-- Unix
  + $TOMCAT_HOME/bin/shutdown   -- Unix
%TOMCAT_HOME%\bin\shutdown  -- Windows
   
   Tomcat may be run with any XML parser that is compliant with the Java API for
  @@ -173,14 +173,14 @@
   trusted. This can be accomplished by executing the following:
   
cd $JAKARTA_HOME/jakarta-tomcat/build/tomcat-- Unix
  - ./bin/tomcat.sh enableAdmin
  + ./bin/tomcat enableAdmin
   
cd %JAKARTA_HOME%\jakarta-tomcat\build\tomcat   -- Windows
bin\tomcat enableAdmin
   
   Next, start Tomcat with: 
   
  - ./bin/startup.sh-- Unix
  + ./bin/startup   -- Unix
bin\startup -- Windows
   
   To run the test, invoke the following URL in your browser:
  
  
  
  1.4   +2 -1  jakarta-tomcat/RELEASE-NOTES-3.3.2.txt
  
  Index: RELEASE-NOTES-3.3.2.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat/RELEASE-NOTES-3.3.2.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RELEASE-NOTES-3.3.2.txt   17 Apr 2002 02:44:11 -  1.3
  +++ RELEASE-NOTES-3.3.2.txt   18 Apr 2002 13:57:59 -  1.4
  @@ -3,7 +3,7 @@
Release Notes
=
   
  -$Id: RELEASE-NOTES-3.3.2.txt,v 1.3 2002/04/17 02:44:11 billbarker Exp $
  +$Id: RELEASE-NOTES-3.3.2.txt,v 1.4 2002/04/18 13:57:59 keith Exp $
   
   
   This document describes the changes that have been made since the
  @@ -21,6 +21,7 @@
   
   8099 Preserve the query string when redirecting to the welcome page.
   
  + Removed '.sh' extension from Unix shell scripts.
   
   

RE: cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2002-04-18 Thread Keith Wannamaker

I haven't heard from any 4.0 folks -- any interest
in me doing something similar for that tree?

Keith

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, April 18, 2002 8:58 AM
| To: [EMAIL PROTECTED]
| Subject: cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF
| test-tomcat.xml
| 
|   Log:
|   Remove '.sh' extensions from shell scripts (in the build).
|   Update references.
|   


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2002-02-06 Thread larryi

larryi  02/02/06 20:01:07

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Fix tests to pass with forwardAll both true and false with Apache, IIS
  and Netscape (4.1).
  
  Added a test to ensure + is converted to space in query string.
  
  Revision  ChangesPath
  1.51  +39 -32jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- test-tomcat.xml   13 Jan 2002 03:01:26 -  1.50
  +++ test-tomcat.xml   7 Feb 2002 04:01:07 -   1.51
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.50 $ /  
  + property name=revision value=$Revision: 1.51 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -186,6 +186,12 @@
 httpStatusMatch match=200 /
 responseMatch match=lt;trgt;lt;tdgt;Path 
Infolt;/tdgt;lt;tdgt;/path?infolt;/tdgt;lt;/trgt; /
 /httpClient
  +  httpClient
  +  commentTest '+' in query string is decoded./comment
  +  httpRequest path=/test/servlet/RequestDump?param=more+text /
  +  httpStatusMatch match=200 /
  +  responseMatch 
match=lt;trgt;lt;tdgt;paramlt;/tdgt;lt;tdgt;lt;spangt;more 
textlt;/spangt; lt;/tdgt;lt;/trgt; /
  +  /httpClient
 /target
   
 target name=params depends=init
  @@ -1253,12 +1259,6 @@
 httpStatusMatch match=200/
 responseMatch match=getRequestURI: /test/jsp/ShowPathInfo.jsp/
 /httpClient
  -  httpClient 
  -  httpRequest path=/test/jsp/HelloWorld%2Ejsp 
  -   method=GET /
  -  httpStatusMatch match=200/
  -  goldenMatch file=${gdir}/HelloWorld.txt /
  -  /httpClient
  /target
   
  target name=security_chk depends=init,security_chk_url
  @@ -1272,6 +1272,13 @@
  returnCode=${http.protocol} 40 
 /
   
  +  httpClient 
  +  httpRequest path=/test/jsp/HelloWorld%2Ejsp 
  +   method=GET /
  +  httpStatusMatch match=${http.protocol} 40 if=tomcat.server /
  +  httpStatusMatch match=${http.protocol} 200 unless=tomcat.server /
  +  /httpClient
  +
 gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%252E HTTP/1.0
  returnCode=${http.protocol} 40 
  @@ -1364,79 +1371,79 @@
 /
  /target
   
  -   !-- Ensure use of Windows DOS devices in JSP name return 404 --
  +   !-- Ensure use of Windows DOS devices in JSP name return 40? --
  target name=dos_devices 
 gtest  request=GET /test/con.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/aux.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/nul.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/NUL.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/prn.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/clock$$.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com1.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com2.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com3.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com4.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com5.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com6.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com7.jsp HTTP/1.0
  - returnCode=${http.protocol} 404 /
  + returnCode=${http.protocol} 40 /
   
 gtest  request=GET /test/com8.jsp HTTP/1.0
  - 

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2002-01-12 Thread larryi

larryi  02/01/12 19:01:27

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Include a test for NUL.jsp (in addition to nul.jsp).
  
  Revision  ChangesPath
  1.50  +4 -1  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- test-tomcat.xml   9 Jan 2002 06:36:24 -   1.49
  +++ test-tomcat.xml   13 Jan 2002 03:01:26 -  1.50
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.49 $ /  
  + property name=revision value=$Revision: 1.50 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -1373,6 +1373,9 @@
returnCode=${http.protocol} 404 /
   
 gtest  request=GET /test/nul.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/NUL.jsp HTTP/1.0
returnCode=${http.protocol} 404 /
   
 gtest  request=GET /test/prn.jsp HTTP/1.0
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2002-01-08 Thread larryi

larryi  02/01/08 22:36:25

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Add tests to ensure JSP pages whose names match Windows DOS device
  names, such as aux.jsp, return not found.
  
  Revision  ChangesPath
  1.49  +74 -2 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- test-tomcat.xml   31 Dec 2001 21:50:09 -  1.48
  +++ test-tomcat.xml   9 Jan 2002 06:36:24 -   1.49
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.48 $ /  
  + property name=revision value=$Revision: 1.49 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -1364,6 +1364,78 @@
 /
  /target
   
  +   !-- Ensure use of Windows DOS devices in JSP name return 404 --
  +   target name=dos_devices 
  +  gtest  request=GET /test/con.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/aux.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/nul.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/prn.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/clock$$.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com1.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com2.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com3.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com4.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com5.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com6.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com7.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com8.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/com9.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt1.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt2.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt3.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt4.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt5.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt6.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt7.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt8.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +
  +  gtest  request=GET /test/lpt9.jsp HTTP/1.0
  + returnCode=${http.protocol} 404 /
  +   /target
  +
  target name=writer depends=init
 httpClient
 commentWriter test, closing writer at end/comment
  @@ -1447,7 +1519,7 @@
   
   
  !--  All targets   --
  -   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers,security_chk,aaa,mangler
  +   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers,security_chk,dos_devices,aaa,mangler
  /target
   
  !--  Aux targets  --
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-12-31 Thread larryi

larryi  01/12/31 13:50:09

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Update to use properties to provide configurable tests to deal with
  behavioral differences among various web servers.
  
  Revision  ChangesPath
  1.48  +103 -57   jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- test-tomcat.xml   9 Oct 2001 02:31:45 -   1.47
  +++ test-tomcat.xml   31 Dec 2001 21:50:09 -  1.48
  @@ -16,10 +16,12 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.47 $ /  
  + property name=revision value=$Revision: 1.48 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  + property name=dir.status value=301 /
  + property name=redir.status value=301 /
property name=outputType value=text /
property name=debug value=0 /
!-- expected http protocol --
  @@ -78,9 +80,11 @@
   
 target name=file depends=init
   
  -gtest  description=Content Type Test
  -   request=GET /test/binaries/image1.gif HTTP/1.0
  -   expectHeaders=Content-Type:image/gif /
  +httpClient unless=netscape.static
  +commentContent Type Test/comment
  +httpRequest path=/test/binaries/image1.gif /
  +headerMatch name=Content-Type value=image/gif/
  +/httpClient
   
   gtest  description=File Integrity and Length Test
  request=GET /test/binaries/image1.gif HTTP/1.0
  @@ -90,11 +94,11 @@
   gtest  description=Get a directory - expect redirect
  request=GET /test/welcome HTTP/1.0
  expectHeaders=Location:/welcome/ 
  -   returnCode=${http.protocol} 301 / 
  +   returnCode=${http.protocol} ${redir.status} / 
   
   gtest  description=Get a dir without welcome file
  request=GET /test/binaries HTTP/1.0
  -   returnCode=${http.protocol} 301 /
  +   returnCode=${http.protocol} ${redir.status} /
   
 /target
   
  @@ -116,6 +120,7 @@
 httpRequest path=/test/servlet/params.Params
param name=a value=Inscrie%C5%A3i-v%C4%83 /
 /httpRequest
  +  responseMatch match=Inscrie#xC5;#xA3;i-v#xC4;#x83; /
 httpStatusMatch match=200 /
 /httpClient
 httpClient
  @@ -125,6 +130,62 @@
 /httpRequest
 responseMatch match=Location = #xBD;#xEA;#xBA;#xDF;#xC3;#xCF; /
 /httpClient
  +  httpClient
  +  commentTest space in directory name/comment
  +  httpRequest path=/test/enc/dir%20name /
  +  httpStatusMatch match=${redir.status} /
  +  headerMatch name=Location
  +   value=http://${host}${colonPort}/enc/dir%20name/index.html;
  +/
  +  /httpClient
  +  httpClient
  +  commentTest space in directory name #2/comment
  +  httpRequest path=/test/enc/dir%20name/index.html /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Found /
  +  /httpClient
  +  httpClient
  +  commentTest space in HTML name/comment
  +  httpRequest path=/test/enc/test%20file.html /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Test /
  +  /httpClient
  +  httpClient
  +  commentTest space in JSP name/comment
  +  httpRequest path=/test/enc/test%20jsp.jsp /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Hello /
  +  /httpClient
  +  httpClient
  +  commentTest encoded space in HTML name/comment
  +  httpRequest path=/test/enc/double%2520enc.html /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Test if we decode only once lt;%= 1 %gt; /
  +  /httpClient
  +  httpClient
  +  commentTest encoded space in JSP Name/comment
  +  httpRequest path=/test/enc/double%2520enc.jsp /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Test if we decode only once 1 /
  +  /httpClient
  +  httpClient
  +  commentTest '+' in HTML name/comment
  +  httpRequest path=/test/enc/test+plus.html /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Test with + lt;%= 1 %gt; /
  +  /httpClient
  +  httpClient
  +  commentTest '+' in JSP name/comment
  +  httpRequest path=/test/enc/test+plus.jsp /
  +  httpStatusMatch match=200 /
  +  responseMatch match=Test with + 1 /
  +  /httpClient
  +  httpClient
  +  commentTest servlet with encoded '?' in pathinfo/comment
  

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-09-22 Thread larryi

larryi  01/09/22 14:16:28

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Add unless=not.standalone to some tests so they will be skipped when
  testing via a web server.  We don't need to be testing how they react
  to bad requests. In some cases they hang anyway.  Ant 1.4 is required
  for the tests to actually be skipped.
  
  Revision  ChangesPath
  1.45  +7 -4  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- test-tomcat.xml   2001/08/30 20:42:04 1.44
  +++ test-tomcat.xml   2001/09/22 21:16:28 1.45
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.44 $ /  
  + property name=revision value=$Revision: 1.45 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -920,7 +920,8 @@
returnCode=${http.protocol} 200
   /
   
  -  gtest  request=GHOST /test/servlet/request.EchoServlet HTTP/1.0
  +  !-- Don't bother to send bad request to web server --
  +  gtest  request=GHOST /test/servlet/request.EchoServlet HTTP/1.0 
unless=not.standalone
content=name=lightness of being
returnCode=${http.protocol} 50
   /
  @@ -955,7 +956,8 @@
returnCode=${http.protocol} 404
   /
   
  -  gtest description=HTTP0.9 doesn't have a POST method 
  +  !-- This test will cause IIS to hang --
  +  gtest description=HTTP0.9 doesn't have a POST method 
unless=not.standalone
 request=POST /test/
content=
returnCode=${http.protocol} 400
  @@ -994,7 +996,8 @@
returnCode=${http.protocol} 200
   /
   
  -  gtest  request=post /test/servlet/request.EchoServlet HTTP/1.0
  +  !-- Don't bother to send bad request to web server --
  +  gtest  request=post /test/servlet/request.EchoServlet HTTP/1.0 
unless=not.standalone
content=name=lightness of being
returnCode=${http.protocol} 50
   /
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-09-22 Thread nacho

nacho   01/09/22 19:56:32

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Another test that fails on IIS 5.0, returns the ROOT index page,
  instead of 403 status
  
  Revision  ChangesPath
  1.46  +2 -1  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- test-tomcat.xml   2001/09/22 21:16:28 1.45
  +++ test-tomcat.xml   2001/09/23 02:56:32 1.46
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.45 $ /  
  + property name=revision value=$Revision: 1.46 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -1281,6 +1281,7 @@
 gtest description=This URL should return 403 Forbidden
  request=GET /%252e%252e/%252e%252e/%00.jsp HTTP/1.0
  returnCode=${http.protocol} 40 
  +   unless=not.standalone
 /
   
 gtest description=This URL should return 403 Forbidden
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-08-30 Thread costin

costin  01/08/30 13:42:04

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Apache has different return codes for bad requests ( I would argue 501 as tomcat
  returns is better than 500, but it doesn't matter )
  
  Revision  ChangesPath
  1.44  +6 -3  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- test-tomcat.xml   2001/08/25 16:18:20 1.43
  +++ test-tomcat.xml   2001/08/30 20:42:04 1.44
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.43 $ /  
  + property name=revision value=$Revision: 1.44 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -922,7 +922,7 @@
   
 gtest  request=GHOST /test/servlet/request.EchoServlet HTTP/1.0
content=name=lightness of being
  - returnCode=${http.protocol} 501
  + returnCode=${http.protocol} 50
   /
   
 !-- Hangs on apache, apache expects a 1.0 requets
  @@ -996,7 +996,7 @@
   
 gtest  request=post /test/servlet/request.EchoServlet HTTP/1.0
content=name=lightness of being
  - returnCode=${http.protocol} 501
  + returnCode=${http.protocol} 50
   /
   
 !-- tolerate bad request for now
  @@ -1201,6 +1201,8 @@
  method=GET /
 httpStatusMatch match=404/
 /httpClient
  +!-- Removed: I see no valid reason for those requests to pass, Apache doesn't 
  +like this, and it's certainly too strange and on the limit 
 httpClient 
 httpRequest path=/test/jsp/ShowPathInfo.jsp;jsessionid=%25%2E%2F%5C 
  method=GET /
  @@ -1213,6 +1215,7 @@
 httpStatusMatch match=200/
 responseMatch match=getRequestURI: /test/js%70/ShowPathInfo.jsp/
 /httpClient
  +--
 httpClient 
 httpRequest path=/test/jsp/ShowPathInfo.jsp;jsessionid=123 
  method=GET /
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-08-25 Thread nacho

nacho   01/08/25 09:18:20

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Forget  to add a dependency to the new mangler tests in client target.
  
  Revision  ChangesPath
  1.43  +2 -2  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- test-tomcat.xml   2001/08/25 14:47:33 1.42
  +++ test-tomcat.xml   2001/08/25 16:18:20 1.43
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.42 $ /  
  + property name=revision value=$Revision: 1.43 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=colonPort value=:${port} /
  @@ -1400,7 +1400,7 @@
   
   
  !--  All targets   --
  -   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers,security_chk,aaa
  +   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers,security_chk,aaa,mangler
  /target
   
  !--  Aux targets  --
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-08-07 Thread larryi

larryi  01/08/07 05:14:20

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Added a colonPort property that includes the colon with the port number,
  and updated response matches to use it to in place of :${port}.  This allows
  you to avoid false failures when using the default port 80.
  
  Revision  ChangesPath
  1.41  +10 -9 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- test-tomcat.xml   2001/08/03 02:57:08 1.40
  +++ test-tomcat.xml   2001/08/07 12:14:20 1.41
  @@ -16,9 +16,10 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.40 $ /  
  + property name=revision value=$Revision: 1.41 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
  + property name=colonPort value=:${port} /
property name=outputType value=text /
property name=debug value=0 /
!-- expected http protocol --
  @@ -458,13 +459,13 @@
   
   gtest  description=SimpleRedirect
  request=GET /test/servlet/dispatch.SimpleRedirectServlet?/index.html 
HTTP/1.0
  -expectHeaders=Location:http://${host}:${port}/index.html; 
  +expectHeaders=Location:http://${host}${colonPort}/index.html; 
   returnCode=${http.protocol} 302 
   /
   
 gtest  description=SimpleRedirect2
request=GET /test/servlet/dispatch.SimpleRedirectServlet?index.html 
HTTP/1.0
  - 
expectHeaders=Location:http://${host}:${port}/test/servlet/index.html; 
  + 
expectHeaders=Location:http://${host}${colonPort}/test/servlet/index.html; 
returnCode=${http.protocol} 302 
  /
   
  @@ -1338,7 +1339,7 @@
 commentTest for required authorization redirection response/comment
 httpRequest path=/test/aaa/protected/index.jsp /
 httpStatusMatch match=302 /
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
   
 !-- Insure unnormalized URL's are handled correctly --
  @@ -1346,31 +1347,31 @@
 httpRequest path=/test/aaa/protected/a/../index.jsp 
  method=GET /
 httpStatusMatch match=302/
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
 httpClient 
 httpRequest path=/test/aaa/a/../protected/index.jsp 
  method=GET /
 httpStatusMatch match=302/
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
 httpClient 
 httpRequest path=/test/aaa//protected/index.jsp 
  method=GET /
 httpStatusMatch match=302/
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
 httpClient 
 httpRequest path=/test/../test/aaa/protected/a/../index.jsp 
  method=GET /
 httpStatusMatch match=302/
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
 httpClient 
 httpRequest path=/test/aaa/./protected/index.jsp 
  method=GET /
 httpStatusMatch match=302/
  -  headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  +  headerMatch name=Location 
value=http://${host}${colonPort}/test/aaa/login.jsp; /
 /httpClient
 httpClient 
 httpRequest path=/test/aaa/protected/../../jsp/ShowPathInfo.jsp 
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-07-19 Thread larryi

larryi  01/07/19 21:28:16

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Fix some descriptions
  
  Revision  ChangesPath
  1.38  +15 -15jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- test-tomcat.xml   2001/07/18 21:20:06 1.37
  +++ test-tomcat.xml   2001/07/20 04:28:16 1.38
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.37 $ /  
  + property name=revision value=$Revision: 1.38 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -1220,12 +1220,12 @@
  returnCode=${http.protocol} 404 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%2E HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%252E HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  @@ -1235,12 +1235,12 @@
  returnCode=${http.protocol} 404 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%5C HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%255C HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  @@ -1250,7 +1250,7 @@
  returnCode=${http.protocol} 404 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.jsp%2520 HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  @@ -1260,31 +1260,31 @@
  returnCode=${http.protocol} 404 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%2e%2e/%2e%2e/%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%252e%252e/%252e%252e/%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%2e%2e/%2e%2e/%5cLICENSE%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%2e%2e/%2e%2e/%5cLICENSE/%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%252e%252e/%252e%252e/%5cLICENSE%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /%252e%252e/%252e%252e/%5cLICENSE/%00.jsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  @@ -1295,16 +1295,16 @@
  goldenFile=${gdir}/HelloWorld.txt
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld.js%2570 HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  -  gtest description=This URL should return HTML, not JSP source
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld%2Ejsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
   
  -  gtest description=This URL should return 404 Not Found
  +  gtest description=This URL should return 403 Forbidden
  request=GET /test/jsp/HelloWorld%252Ejsp HTTP/1.0
  returnCode=${http.protocol} 403 
 /
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-07-17 Thread larryi

larryi  01/07/17 07:12:06

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Specifying a classpath in a Task definition causes Ant to create the task in
  its own class loader.  Thus, GTestDefaults, GTest, and HttpClient tasks
  reference different sets of static result vectors.  test.jsp would always
  display the empty result vectors created for GTestDefaults.  By removing
  the classpath, test.jsp behavior returns to normal.
  
  Hopefully, access to tomcat_util.jar can be provided in some other fashion..
  
  Revision  ChangesPath
  1.36  +1 -22 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- test-tomcat.xml   2001/07/17 05:17:58 1.35
  +++ test-tomcat.xml   2001/07/17 14:12:06 1.36
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.35 $ /  
  + property name=revision value=$Revision: 1.36 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -25,61 +25,40 @@
property name=http.protocol value=HTTP/1.0 /
   
property name=gdir value=../Golden /
  - property name=g.jar
  -value=${tomcat.home}/lib/container/tomcat_util.jar /
  -  
  - path id=cp.g 
  -   pathelement location=${g.jar}/
  - /path
   
!--  Tasks  -- 
taskdef name=httpClient 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.HttpClient /
taskdef name=httpRequest 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.HttpRequest /
taskdef name=header 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Header /
taskdef name=param 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Parameter /
taskdef name=cookie 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Cookie /
taskdef name=body 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Body /
taskdef name=goldenMatch 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.GoldenMatch /
taskdef name=headerMatch 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.HeaderMatch /
taskdef name=httpStatusMatch 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.HttpStatusMatch /
taskdef name=responseMatch 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.ResponseMatch /
taskdef name=responseMatchFile 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.ResponseMatchFile /
taskdef name=sessionMatch 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.SessionMatch /
taskdef name=comment 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Body /
   
taskdef name=gtestDefaults
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.TestDefaults /
   
!-- Backward compatibility --
taskdef name=gtest 
  -   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.GTest /
   
   
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-07-16 Thread costin

costin  01/07/16 22:17:58

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Added the client side of the japanese test.
  
  The funny #XBD; etc are result of od -xa on the page ( I can see
  the icons on the browser ).
  
  Revision  ChangesPath
  1.35  +8 -1  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- test-tomcat.xml   2001/07/16 01:13:45 1.34
  +++ test-tomcat.xml   2001/07/17 05:17:58 1.35
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.34 $ /  
  + property name=revision value=$Revision: 1.35 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -137,6 +137,13 @@
param name=a value=Inscrie%C5%A3i-v%C4%83 /
 /httpRequest
 httpStatusMatch match=200 /
  +  /httpClient
  +  httpClient
  +  commentJapanese/comment
  +  httpRequest path=/test/servlet/ja
  + param name=lang value=ja /
  +  /httpRequest
  +  responseMatch match=Location = #xBD;#xEA;#xBA;#xDF;#xC3;#xCF; /
 /httpClient
 /target
   
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-07-15 Thread costin

costin  01/07/15 18:13:46

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Added few more checks for security.
  
  Add the class path to the taskdefs, so it can be run standalone.
  
  Revision  ChangesPath
  1.34  +99 -5 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- test-tomcat.xml   2001/07/14 03:52:43 1.33
  +++ test-tomcat.xml   2001/07/16 01:13:45 1.34
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.33 $ /  
  + property name=revision value=$Revision: 1.34 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -25,38 +25,62 @@
property name=http.protocol value=HTTP/1.0 /
   
property name=gdir value=../Golden /
  + property name=g.jar
  +value=${tomcat.home}/lib/container/tomcat_util.jar /
  +  
  + path id=cp.g 
  +   pathelement location=${g.jar}/
  + /path
   
!--  Tasks  -- 
taskdef name=httpClient 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.HttpClient /
taskdef name=httpRequest 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.HttpRequest /
taskdef name=header 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Header /
taskdef name=param 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Parameter /
taskdef name=cookie 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Cookie /
taskdef name=body 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Body /
taskdef name=goldenMatch 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.GoldenMatch /
taskdef name=headerMatch 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.HeaderMatch /
taskdef name=httpStatusMatch 
  -classname=org.apache.tomcat.util.test.matchers.HttpStatusMatch /
  +   classpathRef=cp.g
  +   classname=org.apache.tomcat.util.test.matchers.HttpStatusMatch /
taskdef name=responseMatch 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.matchers.ResponseMatch /
taskdef name=responseMatchFile 
  -classname=org.apache.tomcat.util.test.matchers.ResponseMatchFile /
  +   classpathRef=cp.g
  +   classname=org.apache.tomcat.util.test.matchers.ResponseMatchFile /
  + taskdef name=sessionMatch 
  +   classpathRef=cp.g
  +   classname=org.apache.tomcat.util.test.matchers.SessionMatch /
taskdef name=comment 
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.Body /
   
taskdef name=gtestDefaults
  +   classpathRef=cp.g
  classname=org.apache.tomcat.util.test.TestDefaults /
   
!-- Backward compatibility --
  - taskdef name=gtest classname=org.apache.tomcat.util.test.GTest /
  + taskdef name=gtest 
  +   classpathRef=cp.g
  +   classname=org.apache.tomcat.util.test.GTest /
   
   
 !--  Defaults  --
  @@ -106,6 +130,16 @@
 /httpClient
 /target
 
  +  target name=enc depends=init
  +  httpClient
  +  commentFew romanian chars in UNICED/comment
  +  httpRequest path=/test/servlet/params.Params
  + param name=a value=Inscrie%C5%A3i-v%C4%83 /
  +  /httpRequest
  +  httpStatusMatch match=200 /
  +  /httpClient
  +  /target
  +
 target name=params depends=init
 httpClient
 commentSimple GET with parameters/comment
  @@ -458,6 +492,18 @@
   
   /target
   
  +  target name=session depends=init
  +  httpClient
  +  commentGet a session and then include a JSP./comment
  +  httpRequest 
  + path=/test/servlet/dispatch.IncludeJspWithSession HTTP/1.0 /
  +  httpStatusMatch match=200 /
  +  responseMatch match=This is an inner file/
  +  headerMatch name=Set-Cookie value=JSESSIONID= /
  +  /httpClient
  +
  +/target
  +
 !--  Standalone specific  --
 !-- The standalone http and StaticInterceptor may have 
  different behavior than Apache ( even if correct ) --
  @@ -1112,8 +1158,56 @@
returnCode=${http.protocol} 4 /
   
  /target
  +
  +   target 

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-07-13 Thread nacho

nacho   01/07/13 20:52:43

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  *delocalize test, test cannot use messages for match
   will fail on languages distinct from english.
  
  Revision  ChangesPath
  1.33  +1 -2  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- test-tomcat.xml   2001/07/10 21:13:02 1.32
  +++ test-tomcat.xml   2001/07/14 03:52:43 1.33
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.32 $ /  
  + property name=revision value=$Revision: 1.33 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -1233,7 +1233,6 @@
 httpRequest path=/test/aaa/protected/index.jsp /
 httpStatusMatch match=302 /
 headerMatch name=Location 
value=http://${host}:${port}/test/aaa/login.jsp; /
  -  responseMatch match=This document has moved /
 /httpClient
  /target
   
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-05-22 Thread larryi

larryi  01/05/22 20:28:18

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Update expected results for couple of security_chk tests to correct for
  updated Tomcat behavior.
  
  Revision  ChangesPath
  1.31  +5 -7  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- test-tomcat.xml   2001/05/17 00:09:06 1.30
  +++ test-tomcat.xml   2001/05/23 03:28:13 1.31
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.30 $ /  
  + property name=revision value=$Revision: 1.31 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -1194,10 +1194,9 @@
  goldenFile=${gdir}/HelloWorld.txt
 /
   
  -  gtest description=This URL should return HTML, not JSP source
  +  gtest description=This URL should return 404 Not Found
  request=GET /test/jsp/HelloWorld.js%2570 HTTP/1.0
  -   returnCode=${http.protocol} 200 
  -   goldenFile=${gdir}/HelloWorld.txt
  +   returnCode=${http.protocol} 404 
 /
 gtest description=This URL should return HTML, not JSP source
  request=GET /test/jsp/HelloWorld%2Ejsp HTTP/1.0
  @@ -1205,10 +1204,9 @@
  goldenFile=${gdir}/HelloWorld.txt
 /
   
  -  gtest description=This URL should return HTML, not JSP source
  +  gtest description=This URL should return 404 Not Found
  request=GET /test/jsp/HelloWorld%252Ejsp HTTP/1.0
  -   returnCode=${http.protocol} 200 
  -   goldenFile=${gdir}/HelloWorld.txt
  +   returnCode=${http.protocol} 404 
 /
  /target
   
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-05-16 Thread larryi

larryi  01/05/16 17:09:09

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  A few more test cases to check if JSP source is served
  
  Revision  ChangesPath
  1.30  +31 -1 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- test-tomcat.xml   2001/05/15 13:09:16 1.29
  +++ test-tomcat.xml   2001/05/17 00:09:06 1.30
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.29 $ /  
  + property name=revision value=$Revision: 1.30 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -1114,6 +1114,36 @@
  /target
   
  target name=security_chk
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp. HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%2E HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%252E HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp/ HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%5C HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%255C HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
 gtest description=This URL should return 404 Not Found
  request=GET /test/jsp/HelloWorld.jsp%20 HTTP/1.0
  returnCode=${http.protocol} 404 
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-05-15 Thread larryi

larryi  01/05/15 06:09:20

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Add tests to check if escaped URL's are able to cause JSP source to
  be served.
  
  Revision  ChangesPath
  1.29  +67 -2 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- test-tomcat.xml   2001/03/11 21:41:41 1.28
  +++ test-tomcat.xml   2001/05/15 13:09:16 1.29
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name=revision value=$Revision: 1.28 $ /  
  + property name=revision value=$Revision: 1.29 $ /  
property name=host value=127.0.0.1 /
property name=port value=8080 /
property name=outputType value=text /
  @@ -,10 +,75 @@
 gtest request=GET /test/meta-inf/Manifest.mf HTTP/1.0
returnCode=${http.protocol} 4 /
   
  +   /target
  +
  +   target name=security_chk
 gtest description=This URL should return 404 Not Found
  request=GET /test/jsp/HelloWorld.jsp%20 HTTP/1.0
  returnCode=${http.protocol} 404 
 /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%2520 HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /test/jsp/HelloWorld.jsp%00 HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%2e%2e/%2e%2e/%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%252e%252e/%252e%252e/%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%2e%2e/%2e%2e/%5cLICENSE%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%2e%2e/%2e%2e/%5cLICENSE/%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%252e%252e/%252e%252e/%5cLICENSE%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +  gtest description=This URL should return 404 Not Found
  +   request=GET /%252e%252e/%252e%252e/%5cLICENSE/%00.jsp HTTP/1.0
  +   returnCode=${http.protocol} 404 
  +  /
  +
  +  gtest description=This URL should return HTML, not JSP source
  +   request=GET /test/jsp/HelloWorld.js%70 HTTP/1.0
  +   returnCode=${http.protocol} 200 
  +   goldenFile=${gdir}/HelloWorld.txt
  +  /
  +
  +  gtest description=This URL should return HTML, not JSP source
  +   request=GET /test/jsp/HelloWorld.js%2570 HTTP/1.0
  +   returnCode=${http.protocol} 200 
  +   goldenFile=${gdir}/HelloWorld.txt
  +  /
  +  gtest description=This URL should return HTML, not JSP source
  +   request=GET /test/jsp/HelloWorld%2Ejsp HTTP/1.0
  +   returnCode=${http.protocol} 200 
  +   goldenFile=${gdir}/HelloWorld.txt
  +  /
  +
  +  gtest description=This URL should return HTML, not JSP source
  +   request=GET /test/jsp/HelloWorld%252Ejsp HTTP/1.0
  +   returnCode=${http.protocol} 200 
  +   goldenFile=${gdir}/HelloWorld.txt
  +  /
  /target
   
  target name=writer
  @@ -1135,7 +1200,7 @@
  /target
   
  !--  All targets   --
  -   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers
  +   target name=client 
depends=file,params,writer,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers,security_chk
  /target
   
  !--  Aux targets  --
  
  
  



cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-03-03 Thread nacho

nacho   01/03/03 14:08:16

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Added:   src/tests/webpages/WEB-INF/classes CloseWriter.java
   src/tests/share/tests/jsp/Golden CloseWriter.txt
  Log:
  Regression test for reciclying writer bug ( aka RequesDispatcher ) .
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat/src/tests/webpages/WEB-INF/classes/CloseWriter.java
  
  Index: CloseWriter.java
  ===
  import javax.servlet.*;
  import javax.servlet.http.*;
  import java.io.*;
  
  public class CloseWriter extends HttpServlet {
  
  public void init(ServletConfig conf)
  throws ServletException
  {
  super.init(conf);
  }
  
  public void service(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException
  {
  res.setContentType("text/plain");
  PrintWriter out= res.getWriter();
  out.write( "Closing Writer" );
  /// XXX trying to simulate the closed outputstream bug,
  // this test runs 2 times hoping it will catch a regression
  // on this issue.. 
  out.close();
  }
  }
  
  
  
  1.1  jakarta-tomcat/src/tests/share/tests/jsp/Golden/CloseWriter.txt
  
  Index: CloseWriter.txt
  ===
  Closing Writer
  
  
  1.27  +25 -9 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- test-tomcat.xml   2001/03/01 17:59:03 1.26
  +++ test-tomcat.xml   2001/03/03 22:08:16 1.27
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.26 $" /  
  + property name="revision" value="$Revision: 1.27 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -52,7 +52,7 @@
taskdef name="comment" 
  classname="org.apache.tomcat.util.test.Body" /
   
  - taskdef name="gtestDefaults" 
  + taskdef name="gtestDefaults"
  classname="org.apache.tomcat.util.test.TestDefaults" /
   
!-- Backward compatibility --
  @@ -108,7 +108,7 @@
 
 target name="params" depends="init"
 httpClient
  -  commentSimple GET with parmeters/comment
  +  commentSimple GET with parameters/comment
 httpRequest path="/test/servlet/params.Params"
param name="a" value="k" /
param name="c" value="l" /
  @@ -120,7 +120,7 @@
 /httpClient
   
 httpClient
  -  commentSimple POST parmeters/comment
  +  commentSimple POST parameters/comment
 httpRequest path="/test/servlet/params.Params" 
  method="POST"
param name="a" value="b" /
  @@ -133,7 +133,7 @@
   
 httpClient
 commentPOST and GET parameters/comment
  -  httpRequest 
  +  httpRequest
 path="/test/servlet/params.Params" 
 method="POST"
param name="a" value="x" type="GET" /
  @@ -214,7 +214,7 @@
 /httpRequest
 responseMatch match="before:a = [ k , m ]" /
 responseMatch match="before:c = [ l ]" /
  -  responseMatch 
  +  responseMatch
match="Calling RD.include for: params.Params/include1?a=b"/
 responseMatch match="/include1:a = [ b , k , m ]" /
 responseMatch match="/include1:c = [ l ]" /
  @@ -339,9 +339,9 @@
   target name="dispatch" depends="init"
 gtest  description="SimpleInclude"
request="GET /test/servlet/dispatch.SimpleIncludeServlet HTTP/1.0"
  - expectHeaders="Content-Type:text/foobar" 
  + expectHeaders="Content-Type:text/foobar"
returnCode="${http.protocol} 200"
  - goldenFile="${gdir}/SimpleInclude.txt" 
  + goldenFile="${gdir}/SimpleInclude.txt"
  /
 gtest  description="SimpleForward"
request="GET /test/servlet/dispatch.SimpleForwardServlet HTTP/1.0"
  @@ -1107,11 +1107,27 @@
  request="GET /test/jsp/HelloWorld.jsp%20 HTTP/1.0"
  returnCode="${http.protocol} 404" 
 /
  +   /target
   
  +   target name="writer"
  +  httpClient
  +  commentWriter test, closing writer at end/comment
  +  httpRequest path="/test/servlet/CloseWriter" /
  +  httpStatusMatch match="200" /
  +  headerMatch name="Content-Type" value="text/plain" /
  +  goldenMatch 

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-03-01 Thread larryi

larryi  01/03/01 09:59:11

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Added a test to check if a file ending with ".jsp%20" is served.  It should
  result in a 404 Not found error.
  
  Revision  ChangesPath
  1.26  +7 -1  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- test-tomcat.xml   2001/02/28 20:35:15 1.25
  +++ test-tomcat.xml   2001/03/01 17:59:03 1.26
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.25 $" /  
  + property name="revision" value="$Revision: 1.26 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -1102,6 +1102,12 @@
   
 gtest request="GET /test/meta-inf/Manifest.mf HTTP/1.0"
returnCode="${http.protocol} 4" /
  +
  +  gtest description="This URL should return 404 Not Found"
  +   request="GET /test/jsp/HelloWorld.jsp%20 HTTP/1.0"
  +   returnCode="${http.protocol} 404" 
  +  /
  +
  /target
   
  !--  All targets   --
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-02-28 Thread larryi

larryi  01/02/28 12:35:16

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Was testing with Tomcat 3.2 and forgot to update the cookie which
  Tomcat 3.3 uses.
  
  Revision  ChangesPath
  1.25  +2 -2  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- test-tomcat.xml   2001/02/23 21:45:46 1.24
  +++ test-tomcat.xml   2001/02/28 20:35:15 1.25
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.24 $" /  
  + property name="revision" value="$Revision: 1.25 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -445,7 +445,7 @@
 httpRequest path="/test/servlet/dispatch.IncludeJspWithSession HTTP/1.0" 
/
 httpStatusMatch match="200" /
 responseMatch match="This is an inner file"/
  -  headerMatch name="Set-Cookie2" value="JSESSIONID=" /
  +  headerMatch name="Set-Cookie" value="JSESSIONID=" /
 /httpClient
   
   /target
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-02-09 Thread costin

costin  01/02/09 09:02:03

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Ops, the updated file was in build and didn't got commited
  ( thanks to nightly build for finding that :-)
  
  Revision  ChangesPath
  1.16  +28 -22jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- test-tomcat.xml   2001/02/09 03:59:33 1.15
  +++ test-tomcat.xml   2001/02/09 17:02:01 1.16
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.15 $" /  
  + property name="revision" value="$Revision: 1.16 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -39,8 +39,16 @@
  classname="org.apache.tomcat.util.test.Cookie" /
taskdef name="body" 
  classname="org.apache.tomcat.util.test.Body" /
  - taskdef name="defaultMatcher" 
  -   classname="org.apache.tomcat.util.test.DefaultMatcher" /
  + taskdef name="goldenMatch" 
  +   classname="org.apache.tomcat.util.test.matchers.GoldenMatch" /
  + taskdef name="headerMatch" 
  +   classname="org.apache.tomcat.util.test.matchers.HeaderMatch" /
  + taskdef name="httpStatusMatch" 
  +classname="org.apache.tomcat.util.test.matchers.HttpStatusMatch" /
  + taskdef name="responseMatch" 
  +   classname="org.apache.tomcat.util.test.matchers.ResponseMatch" /
  + taskdef name="responseMatchFile" 
  +classname="org.apache.tomcat.util.test.matchers.ResponseMatchFile" /
taskdef name="comment" 
  classname="org.apache.tomcat.util.test.Body" /
   
  @@ -96,9 +104,9 @@
param name="c" value="l" /
param name="a" value="m" /
 /httpRequest
  -  defaultMatcher returnCode="200" /
  -  defaultMatcher responseMatch="a = [ k , m ]" /
  -  defaultMatcher responseMatch="c = [ l ]"/
  +  httpStatusMatch match="200" /
  +  responseMatch match="a = [ k , m ]" /
  +  responseMatch match="c = [ l ]"/
 /httpClient
   
 httpClient
  @@ -108,9 +116,9 @@
param name="a" value="b" /
param name="c" value="d" /
 /httpRequest
  -  defaultMatcher returnCode="200" /
  -  defaultMatcher  responseMatch="a = [ b ]"/
  -  defaultMatcher responseMatch="c = [ d ]"/
  +  httpStatusMatch match="200" /
  +  responseMatch match="a = [ b ]"/
  +  responseMatch match="c = [ d ]"/
 /httpClient
   
 httpClient
  @@ -123,14 +131,14 @@
param name="a" value="b" type="POST" /
param name="c" value="d" type="POST" /
 /httpRequest
  -  defaultMatcher returnCode="200" /
  -  defaultMatcher  responseMatch="a = [ x , b ]"/
  -  defaultMatcher responseMatch="m = [ n ]"/
  -  defaultMatcher responseMatch="c = [ d ]"/
  +  httpStatusMatch match="200" /
  +  responseMatch match="a = [ x , b ]"/
  +  responseMatch match="m = [ n ]"/
  +  responseMatch match="c = [ d ]"/
 /httpClient
   
 httpClient
  -  commentThe POST data can't be read before getParameter/comment
  +  commentThe POST data is not read before getParameter/comment
 httpRequest 
 path="/test/servlet/params.InputStreamParams" 
 method="POST"
  @@ -139,14 +147,13 @@
param name="a" value="b" type="POST" /
param name="c" value="d" type="POST" /
 /httpRequest
  -  defaultMatcher returnCode="200" /
  -  defaultMatcher  responseMatch="a = [ x ]" /
  -  defaultMatcher responseMatch="m = [ n ]"/
  -  defaultMatcher responseMatch="c = [ d ]"/
  +  responseMatch match="a = [ x ]" /
  +  responseMatch match="m = [ n ]"/
  +  responseMatch match="c = [ d ]" magnitude="false" /
 /httpClient
   
 httpClient
  -  commentThe POST data can't be read before getParameter/comment
  +  commentNo data after the params are read/comment
 httpRequest 
 path="/test/servlet/params.ParamsInputStream" 
 method="POST"
  @@ -155,10 +162,9 @@
param name="a" value="b" type="POST" /
param name="c" value="d" type="POST" /
 /httpRequest
  -  defaultMatcher returnCode="200" /
  -  defaultMatcher  responseMatch="a = [ x ]" /
  -  defaultMatcher responseMatch="m = [ n ]"/
  -  

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-02-08 Thread costin

costin  01/02/08 19:59:34

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Update the tests - the "param" target uses the new features.
  
  I'll send detailed instructions on how to add new tests ( it is very
  important to start adding regression tests whenever possible - otherwise
  we'll never be able to make a release without going through hundreds of
  bug reports and wasting the time ).
  
  Revision  ChangesPath
  1.15  +63 -46jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- test-tomcat.xml   2001/02/07 06:49:29 1.14
  +++ test-tomcat.xml   2001/02/09 03:59:33 1.15
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.14 $" /  
  + property name="revision" value="$Revision: 1.15 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -27,11 +27,16 @@
property name="gdir" value="../Golden" /
   
!--  Tasks  -- 
  - taskdef name="gtest" classname="org.apache.tomcat.util.test.GTest" /
taskdef name="httpClient" 
  classname="org.apache.tomcat.util.test.HttpClient" /
  + taskdef name="httpRequest" 
  +   classname="org.apache.tomcat.util.test.HttpRequest" /
taskdef name="header" 
  classname="org.apache.tomcat.util.test.Header" /
  + taskdef name="param" 
  +   classname="org.apache.tomcat.util.test.Parameter" /
  + taskdef name="cookie" 
  +   classname="org.apache.tomcat.util.test.Cookie" /
taskdef name="body" 
  classname="org.apache.tomcat.util.test.Body" /
taskdef name="defaultMatcher" 
  @@ -42,6 +47,10 @@
taskdef name="gtestDefaults" 
  classname="org.apache.tomcat.util.test.TestDefaults" /
   
  + !-- Backward compatibility --
  + taskdef name="gtest" classname="org.apache.tomcat.util.test.GTest" /
  +
  +
 !--  Defaults  --
 target name="init" 
   echo message="Running test-tomcat ${port} ${host} ${http.protocol}"/
  @@ -51,20 +60,7 @@
   protocol="${http.protocol}"
   outputType="${outputType}" /
 /target
  -  !--  File tests  --
  -  target name="new-style" depends="init"
  -  gtest
  -  httpClient path="/test/index.html" debug="0"
  - header name="foo" value="bar"/
  - bodyRequestBody/body
  -  /httpClient
  -  defaultMatcher returnCode="200"
  - header name="Content-Type" value="text/html"/
  -  /defaultMatcher
  -  /gtest
  -   /target
   
  -
 !--  File tests  --
 !-- File, directory and welcome tests --
   
  @@ -93,55 +89,77 @@
 !--  Parameters tests  --
   
 target name="params" depends="init"
  -  gtest
  +  httpClient
 commentSimple GET with parmeters/comment
  -  httpClient path="/test/servlet/params.Params?a=kamp;c=lamp;a=m" /
  +  httpRequest path="/test/servlet/params.Params"
  + param name="a" value="k" /
  + param name="c" value="l" /
  + param name="a" value="m" /
  +  /httpRequest
 defaultMatcher returnCode="200" /
 defaultMatcher responseMatch="a = [ k , m ]" /
 defaultMatcher responseMatch="c = [ l ]"/
  -  /gtest
  +  /httpClient
   
  -  gtest
  +  httpClient
 commentSimple POST parmeters/comment
  -  httpClient path="/test/servlet/params.Params" 
  +  httpRequest path="/test/servlet/params.Params" 
  method="POST"
  - header name="Content-Type" 
  -  value="application/x-www-form-urlencoded" /
  - bodya=bamp;c=d/body
  -  /httpClient
  + param name="a" value="b" /
  + param name="c" value="d" /
  +  /httpRequest
 defaultMatcher returnCode="200" /
 defaultMatcher  responseMatch="a = [ b ]"/
 defaultMatcher responseMatch="c = [ d ]"/
  -  /gtest
  +  /httpClient
   
  -  gtest
  +  httpClient
 commentPOST and GET parameters/comment
  -  httpClient path="/test/servlet/params.Params?a=xamp;m=n" 
  -   method="POST"
  - header name="Content-Type" 
  -  value="application/x-www-form-urlencoded" /
  - bodya=bamp;c=d/body
  -  

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-30 Thread larryi

larryi  01/01/30 18:05:55

  Modified:src/tests/share/tests/jsp/Golden PrintWriterTest.txt
   src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Update PrintWriterTest test to use a responseMatchFile to verify that the
  expected exception occurred.
  
  Revision  ChangesPath
  1.2   +5 -2  
jakarta-tomcat/src/tests/share/tests/jsp/Golden/PrintWriterTest.txt
  
  Index: PrintWriterTest.txt
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/tests/share/tests/jsp/Golden/PrintWriterTest.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PrintWriterTest.txt   2000/01/18 00:02:29 1.1
  +++ PrintWriterTest.txt   2001/01/31 02:05:54 1.2
  @@ -1,2 +1,5 @@
  -
  -
  +Included servlet error: 500
  +java.lang.IllegalStateException: getOutputStream() has already been called
  +!=
  +PreInclude
  +PostInclude
  
  
  
  1.13  +2 -1  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- test-tomcat.xml   2001/01/29 06:59:39 1.12
  +++ test-tomcat.xml   2001/01/31 02:05:54 1.13
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.12 $" /  
  + property name="revision" value="$Revision: 1.13 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -133,6 +133,7 @@
 gtest  description="PrintWriterTest"
request="GET /test/servlet/dispatch.PrintWriterTest1Servlet HTTP/1.0"
returnCode="${http.protocol} 500"
  + responseMatchFile="${gdir}/PrintWriterTest.txt"
  /

   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-28 Thread costin

costin  01/01/28 11:58:21

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Added few comments on the tests that fail on Apache+tomcat ( because
  of different behavior of the static handler ).
  
  Tomcat behavior is not "wrong", but I think we should make it consistent
  with Apache ( i.e. use similar error codes - 301 vs. 302 for example for
  dirs, or the way the index file is displayed - using a redirect in apache
  which may be a better solution for limit cases )
  
  Revision  ChangesPath
  1.10  +16 -6 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- test-tomcat.xml   2001/01/27 18:41:05 1.9
  +++ test-tomcat.xml   2001/01/28 19:58:21 1.10
  @@ -16,11 +16,12 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.9 $" /  
  + property name="revision" value="$Revision: 1.10 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
property name="debug" value="0" /
  + !-- expected http protocol --
property name="http.protocol" value="HTTP/1.0" /
   
property name="gdir" value="../Golden" /
  @@ -46,6 +47,7 @@
   debug="${debug}" 
   protocol="${http.protocol}"
   outputType="${outputType}" /
  +echo message="Running test-tomcat ${port} ${host} ${http.protocol}"/
 /target
 !--  File tests  --
 target name="new-style" depends="init"
  @@ -75,22 +77,30 @@
 /target
   
 target name="file-tomcat" depends="init,file"
  -gtest  description="Welcome File Test1"
  +
  +!-- return code is 301 for Apache, 302 for tomcat --
  +gtest  description="Welcome File Test1 - directory access"
  request="GET /test/welcome HTTP/1.0"
  expectHeaders="Location:/welcome/" 
  -   returnCode="${http.protocol} 302" /
  +   returnCode="${http.protocol} 30" / 
   
  +!-- Difference in behavior between Apache and tomcat 
  + XXX IMHO the tomcat behavior is OK, but it would be a good idea
  + to match Apache and return 302
   gtest  description="Welcome File Test2"
  request="GET /test/binaries HTTP/1.0"
  returnCode="${http.protocol} 200" /
  -
  +--
  +
  +!-- Yet another difference between Apache and tomcat. Not a
  +   bug, but we should fix it anyway  --
   gtest  description="Welcome File Test3"
  request="GET /test/welcome/ HTTP/1.0"
  returnCode="${http.protocol} 302" /
   !--   goldenFile="${gdir}/movedwelcome.txt" /--
  /target
  -
  -  target name="file-apache" depends="init,file"
  +  
  +   target name="file-apache" depends="init,file"
   gtest  description="Welcome File Test1"
  request="GET /test/welcome HTTP/1.0"
  expectHeaders="Location:/welcome/" 
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-28 Thread costin

costin  01/01/28 22:59:43

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Removed: src/tests/share run-test.sh
  Log:
  A bit of reorganization of tests - grouped the tests that are
  specific to standalone and apache ( different behavior for static
  resources - AFAIK both are valid )
  
  Added few comments to some tests, make sure unavailable test is run
  corectly ( it should be a better way to do it - it works only the first
  time anyway )
  
  The run-tests.sh is moved in admin/WEB-INF/scripts - will be enhanced
  to deploy/undeploy the test app, etc ( to avoid having the /tests
  around all the time )
  
  Revision  ChangesPath
  1.12  +112 -138  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- test-tomcat.xml   2001/01/28 21:46:01 1.11
  +++ test-tomcat.xml   2001/01/29 06:59:39 1.12
  @@ -1,4 +1,4 @@
  -project name="TestRun" default="main"
  +project name="TestRun" default="client"
  !-- 
   To test tomcat standalone, type:
 bin/tomcat.sh ant -f conf/test-tomcat.xml client
  @@ -16,7 +16,7 @@
   early tests.
   --
   
  - property name="revision" value="$Revision: 1.11 $" /  
  + property name="revision" value="$Revision: 1.12 $" /  
property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
  @@ -44,12 +44,12 @@
   
 !--  Defaults  --
 target name="init" 
  +echo message="Running test-tomcat ${port} ${host} ${http.protocol}"/
   gtestDefaults port="${port}" 
   host="${host}"
   debug="${debug}" 
   protocol="${http.protocol}"
   outputType="${outputType}" /
  -echo message="Running test-tomcat ${port} ${host} ${http.protocol}"/
 /target
 !--  File tests  --
 target name="new-style" depends="init"
  @@ -66,7 +66,10 @@
   
   
 !--  File tests  --
  +  !-- File, directory and welcome tests --
  +
 target name="file" depends="init"
  +
   gtest  description="Content Type Test"
  request="GET /test/binaries/image1.gif HTTP/1.0"
  expectHeaders="Content-Type:image/gif" /
  @@ -75,42 +78,16 @@
  request="GET /test/binaries/image1.gif HTTP/1.0"
  goldenFile="${gdir}/image1.gif"
  exactMatch="true"  /
  -
  -  /target
  -
  -  target name="file-tomcat" depends="init,file"
   
   gtest  description="Get a directory - expect redirect"
  request="GET /test/welcome HTTP/1.0"
  expectHeaders="Location:/welcome/" 
  returnCode="${http.protocol} 301" / 
   
  -!-- Difference in behavior between Apache and tomcat 
  - XXX IMHO the tomcat behavior is OK, but it would be a good idea
  - to match Apache and return 302
  -gtest  description="Welcome File Test2"
  -   request="GET /test/binaries HTTP/1.0"
  -   returnCode="${http.protocol} 200" /
  ---
  -
  -!-- Yet another difference between Apache and tomcat. Not a
  -   bug, but we should fix it anyway  --
  -gtest  description="Welcome File Test3"
  -   request="GET /test/welcome/ HTTP/1.0"
  -   returnCode="${http.protocol} 301" /
  -!--   goldenFile="${gdir}/movedwelcome.txt" /--
  -   /target
  -  
  -   target name="file-apache" depends="init,file"
  -gtest  description="Welcome File Test2"
  +gtest  description="Get a dir without welcome file"
  request="GET /test/binaries HTTP/1.0"
  returnCode="${http.protocol} 301" /
  -
  -!-- Tomcat returns 302 -- 
  -gtest  description="Welcome File Test3"
  -   request="GET /test/welcome/ HTTP/1.0"
  -   returnCode="${http.protocol} 200" 
  -   goldenFile="${gdir}/welcome.txt" /
  +
 /target
   
 !--  Dispatch tests  --
  @@ -205,32 +182,56 @@
  /
  --
   
  -
  +gtest  description="SimpleRedirect"
  +   request="GET /test/servlet/dispatch.SimpleRedirectServlet?/index.html 
HTTP/1.0"
  +expectHeaders="Location:http://${host}:${port}/index.html" 
  +returnCode="${http.protocol} 302" 
  +/
   
  -/target
  -
  -target name="dispatch-tomcat" depends="init,dispatch"
  -  gtest  description="SimpleRedirect"
  - request="GET /test/servlet/dispatch.SimpleRedirectServlet?/index.html 
HTTP/1.0"
  - expectHeaders="Location:http://${host}:${port}/index.html" 
  -

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-26 Thread nacho

nacho   01/01/26 16:59:20

  Modified:src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  * Tests involving  welcome.tst were bad , because now the 302
  body response is localizd
  
  * Tests involving a Location header were trying
  to match up with "localhost" the default it's "127.0.0.1"
  when there is no no host header in request
  
  Revision  ChangesPath
  1.8   +9 -5  jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- test-tomcat.xml   2001/01/23 05:08:40 1.7
  +++ test-tomcat.xml   2001/01/27 00:59:20 1.8
  @@ -16,7 +16,7 @@
   early tests.
   --
 
  - property name="host" value="localhost" /
  + property name="host" value="127.0.0.1" /
property name="port" value="8080" /
property name="outputType" value="text" /
property name="debug" value="0" /
  @@ -85,8 +85,8 @@
   
   gtest  description="Welcome File Test3"
  request="GET /test/welcome/ HTTP/1.0"
  -   returnCode="${http.protocol} 302" 
  -   goldenFile="${gdir}/movedwelcome.txt" /
  +   returnCode="${http.protocol} 302" /
  +!--   goldenFile="${gdir}/movedwelcome.txt" /--
  /target
   
 target name="file-apache" depends="init,file"
  @@ -499,9 +499,13 @@
  /target
   
 target name="jsp-tomcat" depends="init,jsp"
  +
  +!--
  + goldenFile="${gdir}/movedindex.txt"  
  +--
   gtest  request="GET /test/jsp/ HTTP/1.0"
  -   goldenFile="${gdir}/movedindex.txt"  
  -   description="Redirects to index.html"
  +   returnCode="${http.protocol} 302"   
  +  description="Redirects to index.html"
   /
   
  /target
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-22 Thread costin

costin  01/01/22 21:08:40

  Modified:src/admin/WEB-INF admin.tld
   src/share/org/apache/tomcat/core Response.java
   src/share/org/apache/tomcat/modules/config
PolicyInterceptor.java
   src/share/org/apache/tomcat/modules/server Http10.java
Http10Interceptor.java
   src/share/org/apache/tomcat/util/test DefaultMatcher.java
   src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  2 fixes in the Http implementation:
  - do case-sensitive compare for the http method ( GET works, get doesn't )
  - right HTTP 0.9 support
  
  Also, a fix in the matcher ( the responseCode is not matched, needed to
  deal with 0.9 requests ).
  
  I also commented out or changed a number of tests ( POST doesn't exist
  in 0.9, so need to add the protocol ).
  
  Right now all but one tests are passing.
  The failing test works fine with JspInterceptor ( if useJspServlet="false"
  is used ), but fails with JspServlet.
  
  ( the current default is to use JspServlet, in order to test and make sure
  it is supported and works fine ).
  
  The failing test is test/jsp/classTest.jsp, with the error:
  java.lang.IllegalAccessError: try to access class 
jsp/_0002fjsp_0002fclassTest_0002ejspclassTest_jsp_0$JSPTest$Inner from class 
jsp/_0002fjsp_0002fclassTest_0002ejspclassTest_jsp_0
  
  Revision  ChangesPath
  1.7   +2 -1  jakarta-tomcat/src/admin/WEB-INF/admin.tld
  
  Index: admin.tld
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/admin.tld,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- admin.tld 2001/01/21 20:10:37 1.6
  +++ admin.tld 2001/01/23 05:08:37 1.7
  @@ -20,7 +20,8 @@
   tagclasstadm.TomcatAdmin/tagclass
   teiclasstadm.TomcatAdminTEI/teiclass
   info
  -  Admin
  +  The admin tag will perform various tomcat admin tasks. It'll also
  +  make available the "cm" and "ctx" variables.
   /info
   attribute
  nameaction/name
  
  
  
  1.47  +0 -2  jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java
  
  Index: Response.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Response.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Response.java 2000/12/30 07:54:12 1.46
  +++ Response.java 2001/01/23 05:08:38 1.47
  @@ -349,8 +349,6 @@
*/
   public void notifyEndHeaders() throws IOException {
commited=true;
  - if(request.protocol().isNull()) // HTTP/0.9 
  - return;
   
// let CM notify interceptors and give a chance to fix
// the headers
  
  
  
  1.4   +2 -2  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java
  
  Index: PolicyInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PolicyInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PolicyInterceptor.java2001/01/08 12:15:22 1.3
  +++ PolicyInterceptor.java2001/01/23 05:08:38 1.4
  @@ -72,8 +72,8 @@
* Set policy-based access to tomcat.
* Must be hooked before class loader setter.
* The context will have a single protection domain, pointing to the doc root.
  - *  That will include all classes loaded that belong to the context ( jsps, 
WEB-INF/classes,
  - * WEB-INF/lib/
  + *  That will include all classes loaded that belong to the context
  + * ( jsps, WEB-INF/classes, WEB-INF/lib/
*
* @author  Glenn Nielsen 
* @author [EMAIL PROTECTED]
  
  
  
  1.7   +9 -7  
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java
  
  Index: Http10.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Http10.java   2000/12/30 08:26:45 1.6
  +++ Http10.java   2001/01/23 05:08:39 1.7
  @@ -259,16 +259,18 @@
   
methodMB.setBytes( buf, startMethod, endMethod - startMethod );
// optimization - detect common strings, no allocations
  - if( buf[startMethod] == 'g' ||
  - buf[startMethod] == 'G') {
  - if( methodMB.equalsIgnoreCase( "get" ))
  + // buf[startMethod] == 'g' ||, ignoreCase
  +
  + // the idea is that we don't allocate new strings - but set
  + // to constants. ( probably not needed, it's has a tiny impact )
  + if( buf[startMethod] == 'G') {
  + if( methodMB.equals( "GET" ))
methodMB.setString("GET");
}
  - if( buf[startMethod] == 

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-20 Thread costin

costin  01/01/20 12:11:04

  Modified:src/tests build.xml
   src/tests/share/gtest GTest.java
   src/tests/webpages index.html
   src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Few changes to the self-test building.
  
  The Golden files will be part of the .war file ( no need to polute /lib ),
  allow less config headache.
  
  Reverted to the old package name for the (old) GTest - until the improved
  version is ready.
  
  This is work on progress.
  
  Revision  ChangesPath
  1.2   +12 -11jakarta-tomcat/src/tests/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 2000/12/29 00:20:28 1.1
  +++ build.xml 2001/01/20 20:11:03 1.2
  @@ -37,37 +37,38 @@
   
 !--  Build the internal test app == --
 target name="sanity-test" 
  -mkdir dir="${tomcat.dist}/lib/test"/
  -mkdir dir="${tomcat.dist}/lib/test/Golden"/
  -copy todir="${tomcat.dist}/lib/test/Golden"
  +mkdir dir="${tomcat.build}/webapps/test"/
  +!-- the golden files will be part of the webapp - no 
  + need to have a separate directory or polute lib --
  +
  +mkdir dir="${tomcat.build}/webapps/test/Golden"/
  +copy todir="${tomcat.build}/webapps/test/Golden"
   fileset dir="src/tests/share/tests/jsp/Golden"/
   /copy
   
  -  !-- Test application --
  -mkdir dir="${tomcat.build}/webapps/test"/
   copy 
  todir="${tomcat.build}/webapps/test"
   fileset dir="src/tests/webpages"/
   /copy
  +
   javac 
   srcdir="src/tests/webpages/WEB-INF/classes" 
   optimize="${optimize}" 
   destdir="${tomcat.build}/webapps/test/WEB-INF/classes" 
   classpath="${tomcat.build}/classes;${servlet22.jar}" /
  +
  +!-- build the test driver --
   javac 
   srcdir="src/tests/share/gtest" 
   optimize="${optimize}" 
   destdir="${tomcat.build}/webapps/test/WEB-INF/classes" 
   classpath="${tomcat.build}/classes" /
  -copy 
  -   todir="${tomcat.dist}/webapps/test"
  -fileset dir="${tomcat.build}/webapps/test"/
  -/copy
  +  /target
   
  +  target name="test.war" depends="sanity-test" 
   jar 
 jarfile="${tomcat.dist}/webapps/test.war" 
  -  basedir="${tomcat.dist}/webapps/test" includes="**"/ 
  -delete dir="${tomcat.dist}/webapps/test"/
  +  basedir="${tomcat.build}/webapps/test" includes="**"/ 
 /target
   
 !--  Admin  agreagate  --
  
  
  
  1.2   +1 -1  jakarta-tomcat/src/tests/share/gtest/GTest.java
  
  Index: GTest.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/share/gtest/GTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GTest.java2001/01/20 02:35:36 1.1
  +++ GTest.java2001/01/20 20:11:03 1.2
  @@ -56,7 +56,7 @@
* [Additional notices, if required by prior licensing conditions]
*
*/ 
  -package org.apache.tomcat.util.test;
  +package org.apache.tomcat.util.task;
   
   import java.net.*;
   import java.io.*;
  
  
  
  1.3   +62 -8 jakarta-tomcat/src/tests/webpages/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/index.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.html1999/11/11 22:09:51 1.2
  +++ index.html2001/01/20 20:11:03 1.3
  @@ -1,8 +1,62 @@
  -titleTest Heiarchy Base Page/title
  -body bgcolor="#FF"
  -pfont face="Arial, Helvetica, sans-serif"bfont color="#33FF00"This is 
  -  the home page of the test hierarchy. It doesn't do too much good to look at 
  -  it directly... Instead, why don't you run the tests to find out what you might 
  -  want to know./font/b/font/p
  -pbfont face="Arial, Helvetica, sans-serif" color="#33FF00"Oh, by the way, 
  -  merry christmas.. :)/font/b/p
  +titleSanity Test Base Page/title
  +
  +body
  +
  +This is the home page of the self test hierarchy. 
  +
  +h2Running the tests from the web/h2
  +
  +You first need to enable the /admin application. You'll need that for other 
  +purposes as well. 
  +
  +pEdit TOMCAT_HOME/conf/server.xml  and replace:
  +
  +br
  + lt;Context path="/admin" 
  +  docBase="webapps/admin" 
  +  debug="0" 
  +  reloadable="true" 
  +  btrusted="false"/b gt;
  +br
  +
  +With:
  +
  +br
  + lt; Context path="/admin" 
  +  docBase="webapps/admin" 
  +  debug="0" 
  +  reloadable="true" 
  +  btrusted="false"/b gt; 
  +p

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2001-01-20 Thread costin

costin  01/01/20 22:39:22

  Modified:src/admin/WEB-INF admin.tld
   src/admin/WEB-INF/classes/tadm GTestTag.java
   src/admin/test test.jsp
   src/share/org/apache/tomcat/util/test DefaultMatcher.java
GTest.java Header.java HttpClient.java
Response.java
   src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Second round of changes in the sanity-test running.
  
  You should be able to run the tests by starting tomcat and accessing
  http://localhost:8080/admin/test/test.jsp
  
  The old GTest is deprecated, it has been split into HttpClient and
  DefaultMatcher ( plus a wrapper that allows 'old-style' calling ).
  
  The goal is to make it easy to run the tests, and to make it easy and
  clean to add tests.
  
  I'll probably add a page that allow to run watchdog from the web, but
  right now it's more important to get "writing new tests" and
  adding regression tests for the bugs we fix as easy and simple as possible.
  
  ( long term we should use a dedicated test program - ant is getting
  very hard to use embeded without enough API control ).
  
  Changes:
  - added a form to test.jsp, allow to run a subset of the tests
  - fixes to deal with IntrospectionHelper
  - various fixes in the util.test
  - more debugging
  - dispay the a on GET tests, so we can re-run individual tests
  manually
  - added a sample test using the cleaner ( IMHO ) syntax ( i.e. httpClient
  followed by a matcher )
  
  Missing:
  - code documentation
  - documentation on how to write tests
  - fixes, etc.
  
  ( it's a test application, should make things simpler - if it doesn't we
  should go back to the old one )
  
  Revision  ChangesPath
  1.5   +5 -0  jakarta-tomcat/src/admin/WEB-INF/admin.tld
  
  Index: admin.tld
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/admin.tld,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- admin.tld 2001/01/20 21:50:23 1.4
  +++ admin.tld 2001/01/21 06:39:21 1.5
  @@ -102,6 +102,11 @@
  requiredfalse/required
  rtexprvaluetrue/rtexprvalue
   /attribute
  +attribute
  +   namedebug/name
  +   requiredfalse/required
  +   rtexprvaluetrue/rtexprvalue
  +/attribute
 /tag
   
   
  
  
  
  1.4   +9 -1  jakarta-tomcat/src/admin/WEB-INF/classes/tadm/GTestTag.java
  
  Index: GTestTag.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/tadm/GTestTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GTestTag.java 2001/01/20 23:25:44 1.3
  +++ GTestTag.java 2001/01/21 06:39:21 1.4
  @@ -63,6 +63,7 @@
   String testFileName;
   String target;
   String testApp;
  +String debug;
   
   /** Set the name of the test.xml, relative to the base dir.
*  For example, /WEB-INF/test-tomcat.xml
  @@ -84,6 +85,10 @@
   public void setTestApp( String s ) {
testApp=s;
   }
  +
  +public void setDebug( String s ) {
  + debug=s;
  +}
   
   //  Implementation methods 
   
  @@ -102,6 +107,8 @@
// new one
GTest.setDefaultWriter(out);
GTest.setDefaultOutput("html");
  + if(debug!=null)
  + GTest.setDefaultDebug(Integer.valueOf( debug ).intValue());

Project project=new Project();

  @@ -127,7 +134,8 @@
if( ex instanceof BuildException ) {
Throwable ex1=((BuildException)ex).getException();
System.out.println("Root cause: " );
  - ex1.printStackTrace(out);
  + if( ex1!=null)
  + ex1.printStackTrace(out);
}
}
   }
  
  
  
  1.3   +28 -4 jakarta-tomcat/src/admin/test/test.jsp
  
  Index: test.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/admin/test/test.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test.jsp  2001/01/20 23:25:44 1.2
  +++ test.jsp  2001/01/21 06:39:21 1.3
  @@ -6,11 +6,37 @@
   This page will show the result of executing the sanity test suite. 
   You can see the context log a href="/test/context_log.txt"here/a
   
  +form method="GET" action="test.jsp" 
  +Target:
  +select name="target"  
  +  optionnew-style/option
  +  optionfile-tomcat/option
  +  optiondispatch-tomcat/option
  +  optionget-tomcat/option
  +  optionrequestMap/option
  +  optionpost/option
  +  optionjsp-tomcat/option
  +  optionwrong_request/option
  +  optionunavailable/option
  +  optionrestricted/option
  +  option selectedclient/option
  +/select
  +br
  +
  +Debug: input 

cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF test-tomcat.xml

2000-12-28 Thread costin

costin  00/12/28 16:33:15

  Modified:src/etc  server.xml
   src/share/org/apache/tomcat/request SimpleRealm.java
  Added:   src/etc/users admin-users.xml example-users.xml
global-users.xml tomcat-users.xml
   src/tests/webpages/WEB-INF test-tomcat.xml
  Removed: src/etc  admin-users.xml example-users.xml global-users.xml
tomcat-users.xml
   src/etc/ant test-tomcat.xml
  Log:
  More cleanup.
  
  The sanity-test application is now separated ( no more polution on the
  tomcat distribution ). I'll update the ant file to run it in the new
  structure.
  
  Simple-user realms are grouped under conf/users ( they are not intended for
  production mode anyway - use JdbcRealm or JAAS ).
  
  Revision  ChangesPath
  1.57  +3 -3  jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- server.xml2000/12/27 19:52:50 1.56
  +++ server.xml2000/12/29 00:33:13 1.57
  @@ -199,7 +199,7 @@
 --
   RequestInterceptor 
   className="org.apache.tomcat.request.SimpleRealm" 
  -filename="conf/global-users.xml"
  +filename="conf/users/global-users.xml"
   debug="0" /
   
  !-- UnComment the following and comment out the
  @@ -306,7 +306,7 @@
reloadable="true"  
  RequestInterceptor 
 className="org.apache.tomcat.request.SimpleRealm" 
  -  filename="conf/example-users.xml"
  +  filename="conf/users/example-users.xml"
 debug="0" /
   Logger name="example_tc_log" 
 path="logs/examples.log"
  @@ -333,7 +333,7 @@
trusted="false"  
   RequestInterceptor 
   className="org.apache.tomcat.request.SimpleRealm" 
  -filename="conf/admin-users.xml"
  +filename="conf/users/admin-users.xml"
   debug="0" /
   /Context
   
  
  
  
  1.1  jakarta-tomcat/src/etc/users/admin-users.xml
  
  Index: admin-users.xml
  ===
  tomcat-users
user name="admin" password="changethis" roles="tomcat_admin,tomcat,role1" /
  /tomcat-users
  
  
  
  1.1  jakarta-tomcat/src/etc/users/example-users.xml
  
  Index: example-users.xml
  ===
  tomcat-users
user name="tomcat" password="tomcat" roles="tomcat" /
user name="role1"  password="tomcat" roles="role1"  /
user name="both"   password="tomcat" roles="tomcat,role1" /
  /tomcat-users
  
  
  
  1.1  jakarta-tomcat/src/etc/users/global-users.xml
  
  Index: global-users.xml
  ===
  tomcat-users
user name="root" password="changethis" 
roles="tomcat,role1,tomcat_admin,tomcat_root" /
  /tomcat-users
  
  
  
  1.1  jakarta-tomcat/src/etc/users/tomcat-users.xml
  
  Index: tomcat-users.xml
  ===
  tomcat-users
user name="tomcat" password="tomcat" roles="tomcat" /
user name="role1"  password="tomcat" roles="role1"  /
user name="both"   password="tomcat" roles="tomcat,role1" /
  /tomcat-users
  
  
  
  1.19  +3 -3  
jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java
  
  Index: SimpleRealm.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/SimpleRealm.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- SimpleRealm.java  2000/12/28 01:57:41 1.18
  +++ SimpleRealm.java  2000/12/29 00:33:15 1.19
  @@ -76,7 +76,7 @@
*  an xml file. The file is fully read in memory when the context is
*  initialized.
*
  - *  The default file is TOMCAT_HOME/conf/tomcat-users.xml. You can
  + *  The default file is TOMCAT_HOME/conf/users/tomcat-users.xml. You can
*  change it, and you can also set this module as a per context
*  interceptor, so that each module have it's own realm.
*
  @@ -93,7 +93,7 @@
   int userNote=-1;
   int passwordNote=-1;
   
  -String filename="/conf/tomcat-users.xml";
  +String filename="/conf/users/tomcat-users.xml";
   
   
   public SimpleRealm() {
  @@ -241,7 +241,7 @@
   if (filename != null)
   f=new File( home + File.separator + filename );
   else
  -f=new File( home + "/conf/tomcat-users.xml");
  +f=new File( home + "/conf/users/tomcat-users.xml");
   
   if( !