unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: romel@lavabit.com
Cc: guile-user@gnu.org
Subject: Re: Serving files with guile web server
Date: Sat, 19 Mar 2011 02:20:47 +0000	[thread overview]
Message-ID: <874o6z97gg.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <58164.187.147.43.113.1300373729.squirrel@lavabit.com> (romel@lavabit.com's message of "Thu, 17 Mar 2011 10:55:29 -0400 (EDT)")

romel@lavabit.com writes:

> I gave a second read to the manual and found:
>
> "The handler should return two values: the response, as a <response>
> record from (web response), and the response body as a string, bytevector,
> or #f if not present."
>
> If this is correct then I guess I should check the file type first and
> then read the file to either create a string or a bytevector from it.
>
> Any recommendation will be highly appreciated.

Well, I suppose I'd recommend considering not using the Guile server to
serve static files.  Using Guile makes more sense when you want to
generate dynamic content, because then you're really using the
capabilities of the language.

In my web server experiments so far I've used Apache, modlisp and Guile
together, and this combination seems to work well.  Then Apache can
handle all the static content (I guess using the efficient sendfile)
without bothering modlisp or Guile, but dynamic stuff can be routed via
modlisp to Guile.

Regards,
      Neil



  reply	other threads:[~2011-03-19  2:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 23:33 Serving files with guile web server romel
2011-03-17 14:55 ` romel
2011-03-19  2:20   ` Neil Jerram [this message]
2011-03-19 16:47     ` romel
2011-03-19 18:17       ` Neil Jerram
2011-03-19 22:23         ` romel
2011-03-31 14:44       ` Andy Wingo
2011-03-22  8:51     ` Thien-Thi Nguyen
2011-03-31 14:23       ` Andy Wingo
2011-03-31 15:09         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o6z97gg.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-user@gnu.org \
    --cc=romel@lavabit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).