Hi all,

I'm testing out using chunked encoding with trailing headers at the moment, but 
seem to be having some problems getting the HttpClient to find the trailers. My 
code looks like this:

/***************************************************************/

HttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);

// Tell the server that we can deal with trailers
httpGet.addHeader("TE", "trailers");

// Get the response
HttpResponse response = httpClient.execute(httpGet);

// Print out all the headers we have
for (Header aHeader : response.getAllHeaders()) {
  System.out.println(aHeader.getName() + ": " + aHeader.getValue());
}

/***************************************************************/

The resultant document is transferred in around 100 chunks.

I get all the other trailers I might expect to be printed, including the 
"Trailer: Mytrailer" one that describes what trailers I should I expect. 
However, I don't get "Mytrailer" at all, though I can see it on the wire if I 
use Wireshark.

I noticed in the 3.x documentation there seems to be a lot more info about 
chunked encoding and trailers/footers. However, there's not so much in the 
4.0.1 documentation. Is this not supported any more, or just more integrated 
into normal headers and I've got something wrong?

Any help is much appreciated.

Thanks,
Ben
                                          
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to