SPG wrote:
> Hi,
>
> One of our servers responds to an HTTP request by streaming text through the
> response. It send a header back that specifies the content-length = 0.
>
> Unfortunately the HttpUrlConnection determines that there is no data to read
> and closes the stream.
>
> I am sure there must be a way around this.. Any ideas?
>
> Steve
>
>
Hmmm. That's a tricky one. Let me see.
Oh, yes.
DON'T set the Content-Length header to 0 at the server! It is not
surprising that the UrlConnection terminates the connection if the
server says that it has no data.
If you have to stream data, perhaps a chunked encoded stream is a better
idea?
--
Rogan Dawes
*ALL* messages to
will be dropped, and added
to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"