|Craig R. McClanahan||Nov 30, 2000 1:50 pm|
|Santosh Singh [TEMP]||Nov 30, 2000 3:33 pm|
|Vanitha Venkatraman||Nov 30, 2000 3:42 pm|
|Craig R. McClanahan||Nov 30, 2000 4:17 pm|
|Santosh Singh [TEMP]||Nov 30, 2000 4:21 pm|
|Ankush||Nov 30, 2000 8:58 pm|
|vanitha.venkatraman||Nov 30, 2000 10:29 pm|
|Ankush||Nov 30, 2000 10:35 pm|
|Ankush||Nov 30, 2000 10:57 pm|
|vanitha.venkatraman||Nov 30, 2000 10:59 pm|
|vanitha.venkatraman||Nov 30, 2000 11:06 pm|
|vanitha.venkatraman||Nov 30, 2000 11:17 pm|
|Santosh Singh [TEMP]||Dec 1, 2000 10:47 am|
|Craig R. McClanahan||Dec 1, 2000 5:47 pm|
|vanitha.venkatraman||Dec 4, 2000 9:16 am|
|Subject:||Re: OK, What Gives?|
|From:||Craig R. McClanahan (Crai...@eng.sun.com)|
|Date:||Dec 1, 2000 5:47:26 pm|
Craig, So, this is what is happening:
With Tomcat-4.0-20001129 and Tomcat-4.0-20001130 builds, the Watchdog tests do not run, they hang for all targets (all, jsp, jsp-xml, gtestservlet). I could execute the jsps manually from the browser. So, the war files get deployed on the server. But the tests do not work from GTest. No idea why this is happening. GTest has not changed in a while.
I went as far behind as jakarta-tomcat-4.0-20001103 build and all the Watchdog tests WORK. They execute for all targets.
After a bunch of hours, I discovered what is actually happening, and what I
suggest we do about it.
The HTTP spec says that the request line, and the headers, should be terminated
by CR+LF. The current implementation of the HTTP/1.1 connector in Tomcat 4.0 (20001130) is strict about enforcing this -- if a client sends a line
terminated with just LF instead, it will hang forever, waiting for the CR. (Note to Remy -- the test connector works fine -- it must be tolerant of this case).
I looked at the source code for GTest. In order to send data, it wraps a
PrintWriter around the output stream for the socket, and generates output like this, where "request" is the request line to be sent:
PrintWriter pw = new PrintWriter(out); ... pw.println(request);
On a Windows system, println() will append "\r\n" to this line, so if you run
the GTest client on a Windows box, everything works fine. However, if you run it on a Unix box, as I was doing, it only appends "\n", and everything comes
to a screeching halt.
I modified a local copy of GTest to make the above line look like this:
pw.print(request + "\r\n");
instead, and it works fine on both Unix and Windows systems.
Here is what I suggest we do:
* I propose that Tomcat be modified to be tolerant of request lines and header lines that end with LF instead of CR+LF. The HTTP/1.1 spec suggests this in section 19.3. Remy, could you make this change please?
* I propose to check in my modified version of GTest. It is not reasonable for the test suite to assume that the server under test is tolearant of this kind of spec violation. Is that OK with you, Vanitha?