On Mon, Nov 05, 2012 at 09:49:36AM +0900, Ivan Raikov wrote:
> Hi all,
Hi Ivan,
> I recently had the need to automatically produce native binaries for
> nemo, one of my applications written in Scheme. So I decided to try using
> awful to construct a simple server script that can fetch the latest version
> of nemo from svn, compile nemo and its dependencies, make a release
> tarball, and allow clients to download the latest tarball. With Mario's
> help, it all worked quite well, so I am attaching the resulting script for
> posterity.
Cool!
> The send-file procedure is based on send-static-file from spiffy, and its
> implementation can be seen in the attached file. I hope this is useful for
> some.
I noticed it's more or less an exact copy except for a few
headers. Have you tried just calling send-static-file like this?
(with-headers `((content-disposition #(attachment ((filename . ,filename)))))
(lambda ()
(send-static-file filename)))
The send-status procedure which send-static-file invokes when permission
is denied *should* already ignore the current headers and send its own.
If somehow this doesn't work, I would like to know, so that I can modify
send-static-file to make it more generally useful in order to avoid
having to copy/paste this whole procedure like you had to do.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users