9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eric Grosse <ehg@research.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] httpd and magic
Date: Wed, 13 Nov 2002 11:12:09 -0500	[thread overview]
Message-ID: <fd7aa117e774589ce23bac1091b1682a@plan9.bell-labs.com> (raw)

Moroo,

Did you get a satisfactory solution to having /magic/somecgi
behavior depend on the domain name?

The solution is not to use /sys/lib/httpd.rewrite, because httpd applies
that only for normal file delivery.  Magic is considered as a mechanism
for the developer to have total control, so we jump to that with very
little processing.  However, your somecgi command linked against libhttpd
does have convenient access to hc->head.host extracted from the HTTP
headers, so you can readily personalize the behavior by domain name.

I'm wary of turning this over to shell scripts.  One needs to be
very careful about processing strings coming from the bad guys.  Doing
it in C where you know precisely what is interpreted seems safest.

Eric


             reply	other threads:[~2002-11-13 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-13 16:12 Eric Grosse [this message]
2002-11-14 13:50 ` Moroo Jun
  -- strict thread matches above, loose matches on Subject: below --
2002-11-14 15:11 Eric Grosse
2002-11-14 15:55 ` Gabriel Diaz Lopez de la Llave
2002-10-30  2:04 YAMANASHI Takeshi
2002-10-30 14:11 ` Moroo Jun
2002-10-29 15:48 Moroo Jun
2002-10-30  9:14 ` matt
2002-10-30 14:41   ` Moroo Jun

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

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

  git send-email \
    --in-reply-to=fd7aa117e774589ce23bac1091b1682a@plan9.bell-labs.com \
    --to=ehg@research.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).