On Fri, Feb 26, 2010 at 12:06 PM, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:

> So the thread creation/scheduling and the two times file copying could be
> avoided by writing directly to the output stream. But I agree this would
> have to be special cased somehow. It's not an urgent issue atm, but I'll
> try to see if some clean solution can be implemented.

An idea just struck :-) Could this be handled in much the same way as
a redirect? Something like

S.sendFile("application/pdf", "myfilename.pdf", outputStream =>
mylibrary.write(outputStream))

this would throw an exception like ResponseShortcutException, lift
would intercept it, write the appropriate headers and execute the
passed function with the response outputstream as parameter.

This would prohibit accidental output to response.

Thoughts?

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to