From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] httpd and magic From: Eric Grosse MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 13 Nov 2002 11:12:09 -0500 Topicbox-Message-UUID: 1cc80b6e-eacb-11e9-9e20-41e7f4b1d025 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