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/10 16:37:30 UTC

problems reading servlet input stream

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