Thanks :D On Fri, Apr 29, 2011 at 11:29 AM, Asankha C. Perera <[email protected]>wrote:
> On 04/29/2011 06:38 AM, LongkerDandy wrote: > >> Hi >> >> I have a http server send streaming content to clients. >> I don't know the size of the content because it keep increasing, like a >> file being written by another thread or streaming content from web. >> The server supposes to keep sending until the file in finished or web >> content reach ends. >> >> I wrote a customer HttpEnity, but I don't know how should I return >> Content-Length header. >> Should I return a fake number or omit this header? >> > You should return -1 (See > http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpEntity.html#getContentLength() > ) > > Also refer to > http://hc.apache.org/httpcomponents-core-ga/tutorial/html/fundamentals.html#d4e84for > details on streaming entities > > Hope this helps > asankha > > -- > Asankha C. Perera > AdroitLogic, http://adroitlogic.org > > http://esbmagic.blogspot.com > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
