Greg Lindholm wrote:
Your statement caused me to panic as my code was not prepared to return multiple independent streams and I'm not setting Content Length.

I swear I didn't make this up, as I clearly recall fighting these bugs myself...but you're right, as I cannot currently put my finger on the code that does this...(and it's not in StreamResult, where you and I both expected to find it, even looking back in the webwork revision history, so maybe we're looking in the wrong place?).

In case it's there and I'm just failing to find it, or in case this changes (back again?) in the future, is there any reason not to put your "new FileInputStream(...)" call in the action getter that returns the InputStream?

Are you referring to something else? Please clarify. (A link to a reference would also be nice.)

I wish I could. I will stop providing this advice until I (re)find it's source.

On a related note, I'm downloading a file and I'm using a FileInputStream for my input stream. Can I set the Content Length using File.length()? Or is there some munging that occurs to change the content length?

File.length() is the correct return value, and it can only help to specify it when known beforehand.

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to