--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Hanna,At this point, Lift does not support chunked HTTP response (I don't know the right words for the feature, but it allows an HTTP request to ask for only a range of a file.) That would likely make your audio file play back more evenly.Please open a ticket at http://ticket.liftweb.net and link to this thread.If anyone else has ideas/suggestions, please post them.
[...]
> If I put the same audio file in static, and let Jetty handle the response,
> it works just fine.
Would be interesting to see the HTTP flow in this case to determine if
it uses Chunked transfer encoding....
> Does anyone have any suggestions on how to write the response? Or is there
> any way to just compute the exact location of the file, and pass a java
> input stream (or similar) over to Jetty instead, where it seems to work
> already?
You could just map a path to be handled directly by jetty, bypassing
lift, and then store the content there.
/Jeppe
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Thanks - would have loved to but am back in Cambridge now. I might keep it as a credit for next time, though ;-)
--
LiftRules.liftRequest.append {
case r @ Req("mediadir" :: filename :: Nil,_,_) => {
debug("passing request onto container: " + r)
false
}
}
in your Boot.scala will pass matching requests onto Jetty, but there are quite a few more issues to iron out (like making sure you don't try to upload files into a directory in your WAR file). There are plenty of threads in this group that discuss various approaches.
--