Hi Mikkel,

As Lars pointed out, the HttpUrlConnection was improved on this front in JDK
5:
1) Fixed Streaming mode when content length is known
2) Chunked Streaming mode when content length is not known

The current HTTP client connector even has a parameter called "chunkLength"
that can be set, but it's not supported in beta 18 (lack of time):
http://www.restlet.org/docs/ext/com/noelios/restlet/ext/net/HttpClient.html

I've just checked in a patch to support the two modes cited above:
 - If your input representation has its 'size' property set, then the first
mode is automatically used
 - If not, and if the 'chunkedLength' parameter is set with a value of 0
(default JDK's size used) or above (custom size used), then the chunked
streaming mode is used
 - If not, then the input is buffered to determine its length as in beta 18.

If you could get the latest from SVN and give it a try before beta 19
release that would be cool.

Best regards,
Jerome  

> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Mikkel Jensen
> Envoyé : mercredi 6 septembre 2006 13:10
> À : [email protected]
> Objet : Re: FileRepresentation buffers large files
> 
> Hi Lars, 
> 
> Thank you for your post - that explains the low activity the 
> past couple of 
> weeks! 
> 
> I'll try and look into the Apache HttpClient source code as 
> you suggest. 
> 
> Found out there is a fixed-length streaming mode on 
> HttpUrlConnection to 
> disable buffering, so maybe there is hope after all. 
> 
> - Mikkel 
> 
> 

Reply via email to