Ortwin, thanks for the advice

I reconfigure connector with bufferSize=0 and call
response.setHeader("Content-Length", "0");

However, my client fails at

InputStream response = httpGet.getResponseBodyAsStream();

where response is null

However, in my opinion, the connector should be smart enought to trigger and
chunked transfer encoding at the server size when I set the header
Transfer-Encoding as chunked.

It seems this is connector problem, dont you agree?

-D




----- Original Message ----- 
From: "Ortwin Gl�ck" <[EMAIL PROTECTED]>
To: "Commons HttpClient Project" <[EMAIL PROTECTED]>
Sent: Tuesday, September 02, 2003 12:08 AM
Subject: Re: HttpGet with Chunked response


> Dan Tran wrote:
> >   - The servlet picks up the GET request in doGet(), simulate a buffer
> >     of TestSize, and send buffer back to the client using chunked
> > Transfer-Encoding
> >     by calling response.setHeader( "Transfer-Encoding", "chunked");
>
> I don't think that you can force the server to use chunked encoding by
> setting the header. I rather suggest:
>
> - do not supply a content length
> - turn off buffering in the servelet response and in server.xml:
> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>             bufferSize="0" />
>
> Then the server has no other possibility than use chunked TE (or fail
> with a HTTP/1.0 client).
>
> Odi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to