You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Frank Biederich <fb...@Adobe.COM> on 2000/01/14 11:26:22 UTC

[Fwd: problems reading servlet input stream]

Hi all -

any ideas ? Anyone who knows about this problem ?

Best, Frank

-------- Original Message --------
Subject: problems reading servlet input stream
Date: Mon, 10 Jan 2000 16:37:30 +0100
From: Frank Biederich <fb...@adobe.com>
Reply-To: fbiederi@adobe.com
To: tomcat-dev@jakarta.apache.org
References: <A9...@dueis01nok>

Hi -

i've experienced problems with the new http connector class
(org.apache.tomcat.service.http.HttpAdapter) trying to read the servlet
input stream. The process is waiting for more bytes to come but all of
them had already been read!?

The older one (org.apache.tomcat.server.HttpServerConnector) took care
about the 'Content-Length' header (in
org.apache.tomcat.server.ConnectionHandler) which works fine in my
scenario:

    public void run() {
	...
	int contentLength = request.getIntHeader("content-length");

	if (contentLength != -1) {
		BufferedServletInputStream sis =
			(BufferedServletInputStream)request.getInputStream();
		sis.setLimit(contentLength);
	}
	...
    }

Any reasons why this code is not included in
org.apache.tomcat.service.http.HttpConnectionHandler.java? 

Best, Frank