From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3EDB3B44.8030805@proweb.co.uk> From: matt User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] httpd scripting References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 2 Jun 2003 12:55:48 +0100 Topicbox-Message-UUID: c1bcfbc0-eacb-11e9-9e20-41e7f4b1d025 Skip Tavakkolian wrote: >Has anyone done any deep thinking on this? I've just started >looking into it. I have looked at Pegasus, but I need something a >little more specialized. My own preference is for an awk-like environment >but nothing definite yet. I want to process code fragments inside >html docs, the same thing as jsp,asp,php, etc. > as someone who uses PHP (and previously ASP) professionally - don't 8) RC and friends is enough if want awk then use awk 8) as for cookies, headers etc. you just need a quick script to chuck the request into the environment (which is what PHP does) I did write a script to do it once http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&threadm=015d01c22ed3%24fcc596e0%246501a8c0%40KIKE&rnum=1&prev=/groups%3Fq%3Dgroup:comp.os.plan9%2Bhttpd%2Bmatt%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26safe%3Doff%26selm%3D015d01c22ed3%2524fcc596e0%25246501a8c0%2540KIKE%26rnum%3D1 but I seem to have lost the code during a re-install (curses for putting the magic directory outside of /usr ) All you really need to do is split the headers on the first colon : ([^:]+): ?(.*) (after skipping past the first line) and then pop the results into the environment echo $match_2 > /env/$match_1 when you run out of matches the rest of stdin is the body & you might even be able to trust the Content-Length value