Returning a response of unknown length using WOResponse.setContentStream()
Returning a response of unknown length using WOResponse.setContentStream()
- Subject: Returning a response of unknown length using WOResponse.setContentStream()
- From: Paul Hoadley <email@hidden>
- Date: Thu, 28 Mar 2019 12:32:21 +1030
Hello,
I am zipping some files on the fly and trying to return the ZIP to the browser.
(None of the files are on the appserver, including the resulting ZIP—it's all
InputStreams and OutputStreams.) I can call WOResponse.setContentStream(), but
it expects a contentSize argument. Setting this to, say 0, or some arbitrarily
large number doesn't work. It certainly appears that the browser expects the
correct value or no header. What I can't see is where "content-size" is even
being set—as late as after WOApplication.dispatchRequest(), the WORequest
doesn't seem to have a "content-size" header. If I knew where/when it was being
set, I could presumably remove it.
Has anyone solved any of these problems before? How can I return a response of
unknown length to the browser?
--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden