On Nov 27, 2006, at 10:37 AM, Matthew Serrano wrote:

I would like to use Hessian to replace a custom HTTP-based file download service. I have implemented the service and successfully downloaded my data but I would like to display a progress bar as the file data is being downloaded. I see that I can modify my client to read the response stream but I cannot seem to get a "content length" from the response...always comes back -1. Any idea on how I can set the content length so my client will know how much data to expect?

In general, you wouldn't want to do this as part of the HTTP protocol. To set the Content-Length header, you'd need to buffer the entire Hessian response, which you probably don't want to do.

You could try encapsulating your response as something like:

class Response {
  int length;
  byte []data;
}

It might be a little extra work to make that efficient.

-- Scott


thanks
matt
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to