You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by "Pier P. Fumagalli" <pi...@betaversion.org> on 2001/08/05 20:50:13 UTC

GTest in watchdog fails with Apache...

There's a small bug in the WatchDog GTest. Simply what it does is that it's
sending TWO Content-Length headers in the same request, and Apache correctly
translates those two headers into one single headers like:

    Content-Length: <firstval>, <secondval>

This small patch fixes the problem, but Tomcat 4.0 SHOULD throw back an
error to the client too (IMO).

    Pier


Index: src/tools/org/apache/tomcat/task/GTest.java
===================================================================
RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.1
diff -u -3 -r1.1 GTest.java
--- src/tools/org/apache/tomcat/task/GTest.java 2000/11/03 17:07:20     1.1
+++ src/tools/org/apache/tomcat/task/GTest.java 2001/08/05 18:25:14
@@ -419,9 +419,6 @@
        try {
            pw.println(request);
            
-           if( content != null) {
-               pw.println("Content-Length: " + content.length());
-           }
            // Now sending any specified request headers
            if ( requestHeaders != null )
            {


Re: GTest in watchdog fails with Apache...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Another small issue with watchdog (coming out of the JSP tests this time) is
that Apache always replies with HTTP/1.1 also to an HTTP/1.0 request For
example:

# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.betaversion.org.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 05 Aug 2001 19:05:20 GMT
Server: Apache/1.3.19 (Darwin)
[...]
Connection closed by foreign host.
#  

This will make 4 tests in the JSP tests suite fail, although they shouldn't
(the only difference is that Watchdogs expects 1.0 while Apache replies
1.1).

Can someone fix that?

    Pier


Re: GTest in watchdog fails with Apache...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Another small issue with watchdog (coming out of the JSP tests this time) is
that Apache always replies with HTTP/1.1 also to an HTTP/1.0 request For
example:

# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.betaversion.org.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 05 Aug 2001 19:05:20 GMT
Server: Apache/1.3.19 (Darwin)
[...]
Connection closed by foreign host.
#  

This will make 4 tests in the JSP tests suite fail, although they shouldn't
(the only difference is that Watchdogs expects 1.0 while Apache replies
1.1).

Can someone fix that?

    Pier


Re: GTest in watchdog fails with Apache...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Another small issue with watchdog (coming out of the JSP tests this time) is
that Apache always replies with HTTP/1.1 also to an HTTP/1.0 request For
example:

# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.betaversion.org.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 05 Aug 2001 19:05:20 GMT
Server: Apache/1.3.19 (Darwin)
[...]
Connection closed by foreign host.
#  

This will make 4 tests in the JSP tests suite fail, although they shouldn't
(the only difference is that Watchdogs expects 1.0 while Apache replies
1.1).

Can someone fix that?

    Pier