Hi,

What's the preferred way of sending back a static file (that lives on
the host filesystem) through lift? I'm using lift's custom dispatch.

I'm currently putting a FileInputStream into StreamingResponse. I'm
not setting a Content-Type in the StreamingResponse constructor, but
Jetty seems to be sending:

Content-Type: application/xhtml+xml; charset=utf-8


This is obviously bad for CSS files or images that I'm serving. Is
there a smarter way to send the contents of files? Preferably one that
automatically sets the correct Content-Type... or leaves it blank for
the browser to ascertain.

Of course, I can always use the Java mime-util library to detect and
set for each file, just wondering if there's a smarter way to do this.
-- 
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