tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF/classes/headers HeaderOS.java
Date Fri, 16 Feb 2001 05:52:04 GMT
costin      01/02/15 21:52:04

  Modified:    src/tests/webpages/WEB-INF test-tomcat.xml
  Added:       src/tests/webpages/WEB-INF/classes/headers HeaderOS.java
  Log:
  Added test for 473, can't reproduce.
  
  Revision  Changes    Path
  1.23      +12 -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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- test-tomcat.xml	2001/02/12 15:01:21	1.22
  +++ test-tomcat.xml	2001/02/16 05:52:03	1.23
  @@ -16,7 +16,7 @@
           early tests.
       -->
   
  -     <property name="revision" value="$Revision: 1.22 $" />  
  +     <property name="revision" value="$Revision: 1.23 $" />  
        <property name="host" value="127.0.0.1" />
        <property name="port"     value="8080" />
        <property name="outputType"     value="text" />
  @@ -96,6 +96,16 @@
   
     <!-- ==================== Parameters tests ==================== -->
   
  +  <target name="headers" depends="init">
  +      <httpClient>
  +          <comment>Set Content-Type and Content-Length, get OS</comment>
  +          <httpRequest path="/test/servlet/headers.HeaderOS" />
  +          <httpStatusMatch match="200" />
  +          <headerMatch name="Content-Type" value="test/foobar" />
  +          <headerMatch name="Content-Length" value="5" />
  +      </httpClient>
  +  </target>
  +  
     <target name="params" depends="init">
         <httpClient>
             <comment>Simple GET with parmeters</comment>
  @@ -1089,7 +1099,7 @@
      </target>
   
      <!-- ==================== All targets ====================  -->
  -   <target name="client" depends="file,params,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable">
  +   <target name="client" depends="file,params,dispatch,get,requestMap,post,wrong_request,restricted,jsp,unavailable,headers">
      </target>
   
      <!-- ==================== Aux targets ==================== -->
  
  
  
  1.1                  jakarta-tomcat/src/tests/webpages/WEB-INF/classes/headers/HeaderOS.java
  
  Index: HeaderOS.java
  ===================================================================
  package headers;
  
  import javax.servlet.*;
  import javax.servlet.http.*;
  import java.io.*;
  
  /** Set headers before getting OS
   *  Bug 473.
   */
  public class HeaderOS extends HttpServlet {
  
      public void doGet(HttpServletRequest req, HttpServletResponse res)
          throws ServletException, IOException
      {
  	res.setContentType("test/foobar");
  	res.setContentLength(5);
  
  	ServletOutputStream sos=res.getOutputStream();
  	sos.println("Hello");
      }
  
  
  }
  
  
  
  
  
  

Mime
View raw message