jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest GetContentTypeTestServlet.java
Date Sun, 17 Dec 2000 04:58:52 GMT
craigmcc    00/12/16 20:58:51

  Modified:    src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest
                        GetContentTypeTestServlet.java
  Log:
  Make the test stronger.  A null value is allowed by the spec only if the
  content type is unknown, but it is known in this case because the client
  unconditionally sends it.
  
  Revision  Changes    Path
  1.3       +6 -5      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java
  
  Index: GetContentTypeTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetContentTypeTestServlet.java	2000/12/17 04:48:43	1.2
  +++ GetContentTypeTestServlet.java	2000/12/17 04:58:51	1.3
  @@ -1,6 +1,6 @@
   /*
  - * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java,v
1.2 2000/12/17 04:48:43 craigmcc Exp $
  - * $Date: 2000/12/17 04:48:43 $
  + * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java,v
1.3 2000/12/17 04:58:51 craigmcc Exp $
  + * $Date: 2000/12/17 04:58:51 $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -81,9 +81,10 @@
   
   		// in client side it was set to "text/plain"
   		String contentType=request.getContentType();
  -		if(contentType == null) { // spec says that it can be null
  -			out.println("GetContentTypeTest test PASSED");
  -		} else if (contentType.equals("text/plain")) {
  +                if (contentType == null) {
  +                        out.println("GetContentTypeTest test FAILED");
  +                        out.println("contentType is NULL!");
  +                } else if (contentType.equals("text/plain")) {
   			out.println("GetContentTypeTest test PASSED");
                   } else {
                           out.println("GetContentTypeTest test FAILED");
  
  
  

Mime
View raw message