I received the following mail asking for chunked-encoding support.  Does
anyone know an example of a publically available client that makes chunked
requests? Supporting this is probably going to require changes to the C and
Java portions of Jserv.  I've never encountered a client that made a chunked
request and I'd like to see one before making any changes.

Jon Smirl
[EMAIL PROTECTED]


From: Barry Lind <[EMAIL PROTECTED]>
Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
Date: Wed, 26 Jan 2000 12:34:34 -0800
To: [EMAIL PROTECTED]
Subject: Problems with chunked transfer encodings in JServ 1.1

----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


We just discovered that we have a client program (not developed by us,
so we can't change how it works) that is trying to interact with our
servlets running under JServ.  The client's requests are failing because
the client is sending chunked transfer encodings (header
Transfer-Encoding= chunked).  For those unfamiliar with the HTTP 1.1
spec this means that the body (in this case the body of a PUT method),
doesn't contain a Content-Length header, and instead sends the body of
the request as a series of chunks, each proceeded by a size marker.  The
server then is responsible for parsing the chunks, removing the size
markers and assembling the request body.

>From an email chain I found
(http://www.magiccookie.com/bboard/do=list-containers/container=1748)
there is a discussion on how JServ 1.0, doesn't support chunked
encoding, but that it was being worked on.

It looks indeed like some of the support for chunked encoding has been
added.  In jserv_apjv12.c the code has changed from 1.0 to 1.1 to call
ap_setup_client_block() with REQUEST_CHUNKED_DECHUNK, instead of
REQUEST_CHUNKED_ERROR.

However the chunked support doesn't seem to work.  What happens under
JServ 1.1 is that the servlet can read the body of the HTTP request
through the JServInputStream, but since the content length isn't set
(i.e. it is -1), the input stream doesn't seem to know when the end of
the request body is reached, and just hangs waiting for mod_jserv to
send more data.

My environment is:
WinNT
Apache 1.3.9
JServ 1.1
JDK 1.2.2

Does anyone have JServ working with requests coming in in chunked
format? or have any suggestions?

thanks,
--Barry





--
----------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to