On Fri, Jul 17, 2009 at 1:13 PM, Steve
Davis<steven.cha...@gmail.com> wrote:
>
> Ben,
>
> Take a look at the ".ez" experimental support added in OTP R12-5 and
> improved in R13
Thanks for the heads up, but unfortunately the code loading support
pertains to .beam and .app files as opposed to arbitrary files. Also,
the serve_file logic in mochiweb is designed around filehandles for
each requested object, and I don't think this would to easy to
shoehorn the zip API into this.
Ben
So don't use serve_file, write your own function that does what
serve_file does. It doesn't do anything that you can't do yourself.
The request module isn't special.
-bob
On Fri, Jul 17, 2009 at 4:06 PM, Bob Ippolito<b...@redivi.com> wrote:
>> Thanks for the heads up, but unfortunately the code loading support
>> pertains to .beam and .app files as opposed to arbitrary files. Also,
>> the serve_file logic in mochiweb is designed around filehandles for
>> each requested object, and I don't think this would to easy to
>> shoehorn the zip API into this.
>
> So don't use serve_file, write your own function that does what
> serve_file does. It doesn't do anything that you can't do yourself.
> The request module isn't special.
Sorry, I was expressing myself badly - I think the fundamental problem
with the zip API is that you can't use an opened ZipHandle to
reference the contents of an individual file - doing a zip_get on a
file results in the file being unzipped to a directory or memory. The
former boils down to just unzipping and serving the file normally, the
latter doesn't give you a handle on the content of the extracted file,
so having it in memory is not going to help because you can't
reference it. So it's not really down do the request module anyway.
Ben