You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Nivy, Ofer" <Of...@icomverse.com> on 2001/04/16 07:34:51 UTC

missing content in http response

hi,
I have the following strange phenomena:
when sending a http request to a Servlet, the content of the response is
sometimes missing.
* the connection is done through a firewall on standard port 80. when
sending requests from
	 the same machine it works fine.
* I use tomcat 3.2.1 on NT WS4(client & server)
* I haven't found the circumstances where this happens. the same request can
sometimes produce 
	a perfect response, and a cut one a minute later.
* I've made some tests, and found out that the response sometimes does not
contains an empty 
	line between the http headers and the content. the last http header
is followed by one 
	or two CRLFs - randomly (to me).

here is an example:
the servlet: I've put it in TOMCAT_HOME/webapps/examples/WEB-INF/classes
----------------------------------------------------------------------------
---------------
public class Test extends HttpServlet{
	protected void doGet(HttpServletRequest req, HttpServletResponse
resp) throws 
	
ServletException, IOException {
		resp.getWriter().write("some content");
	}
}
----------------------------------------------------------------------------
---------------
the request:
GET /examples/servlet/Test HTTP/1.0


produced the following responses:
====case one: OK ================
HTTP/1.0 200 OK
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0;
Windows NT 4.0 x86; java.vendor=Sun 
Microsystems Inc.)

some content
=================================

====case two: error================
HTTP/1.0 200 OK
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0;
Windows NT 4.0 x86; java.vendor=Sun 
Microsystems Inc.)
====================================



any ideas?
thanks,
ofer