On Wed, Jul 15, 2009 at 12:16 AM, Bob Ippolito<b...@redivi.com> wrote:
>
> 3. MochiWeb's capability to serve static files is for demonstration
> purposes, not really for production use. I'd accept a patch that did
> the redirect, but if you're relying on mochiweb to serve lots of
> static files from disk every request using that code, you're probably
> doing it wrong.
Thanks for the heads up. Looking at the serve_file/3 implementation, I
can see your point about the non-production readiness. My assumption
was that most people would stick either some kind of front-end http
server in front of mochiweb for static content, or some kind of
accelerator.
In my use case, I want to use mochiweb to handle JSON RPCs as opposed
to serving out lots of static content. In fact, the static content is
just their to serve up the web app and JS required for the client to
make the RPCs in the first place.
So I probably will end up patching mochiweb to handle this, so when I
do this, I'll fire off a patch.
Thx,
Ben
Ben
On Wed, Jul 15, 2009 at 12:16 AM, Bob Ippolito<b...@redivi.com> wrote:
> I'd accept a patch that did the redirect
I've attached a patch. Because I couldn't see an integration test
suite for verifying HTTP responses from mochiweb, I wasn't able to add
a unit test for this. It has been tested manually though.
Ben