You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Th...@nokia.com on 2000/01/03 09:54:43 UTC

question about POST-method

Hi,

few days ago I installed tomcat 3.0 on my computer. Unfortunately I have
problems when I use the POST-method. The entered data is submitted to 
the servlet, but the response is not completed. The browser gets the
response 
and says "x bytes read" and is still waiting for further data to come. 

The same problem occurs with the example "RequestParamExample". After
the data is submitted to this servlet the browser shows the response and 
says "<716 + number of entered bytes> read" and is still waiting to get
further data.

Everything works fine with jswdk-1.0.1.

Is this a configuration fault? Does anyone know this problem? 
Thank you very much in advance! 

thomas


problems reading servlet input stream

Posted by Frank Biederich <fb...@Adobe.COM>.
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