lfe-mug / lmug

LFE HTTP Server Abstraction and Web Application Middleware Infrastructure
20 stars 3 forks source link

Add lmug-mw-file #17

Open oubiwann opened 8 years ago

oubiwann commented 8 years ago

See https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/file.clj

yurrriq commented 8 years ago

This seems awfully web-server-dependent and I'm not sure a general solution makes much sense.

oubiwann commented 8 years ago

Yeah, definitely web-server-dependent ... the ultimate goal for lmug apps is to be portable between web servers. So it makes sense to explore the boundaries of that goal. Maybe we won't be able to do this in a way that is web-server-agnostic -- but maybe we will!

Ring supports this feature -- I think it would be good to explore, at the very least.

yurrriq commented 8 years ago

Let's make a list of how the various web servers do it. I can handle elli and cowboy if you wanna do yaws and inlets.

oubiwann commented 7 months ago

Most of the work for this is already done as part of the first draft in #7. Note: that implementation doesn't worry about underlying HTTP servers, so the concerns noted above don't apply.

All that's left to do for this middleware (after acceptance testing is complete on #7) is to special-case the functionalty for a single file and create the tiny mw wrapper for it.