Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] httpd utilities / scripts

0 views
Skip to first unread message

matt

unread,
Jul 18, 2002, 11:26:22 PM7/18/02
to
I've been playing with httpd this evening and done what I think is a useful
script.

What it does is take the command line options and HTTP headers and put them
all in environment variables.

I did this to facilitate shell scripted web pages.

It works by adding :

rfork E
/bin/ip/httpd/populate_environment.rc $*

to the top of any web serving scripts and then the HTTP Headers etc. can be
accessed through /env

the example script uses html_encode.sed, which is a very low quality cut and
pasted html entity encoder (supplied)

I'm also including url_encode.awk which is nothing to do with this but
useful all the same

For as long as I am on this IP address you can see it in action at

http://pc1-nott2-3-cust35.not.cable.ntl.com/magic/http_info.rc

suggestions / criticisms welcome

Matt

html_encode.sed
http_info.rc
populate_environment.rc
url_encode.awk

matt

unread,
Jul 18, 2002, 11:40:22 PM7/18/02
to
:) I was just lying in bed and remembered that there's an eval in that
script which I was going to take out once the code was working

tomorrow

m

William S.

unread,
Jul 19, 2002, 3:43:22 AM7/19/02
to
Is httpd ported to Plan9? Is that what you are using?
Just curious. Right now I have been doing things with
php under Slackware but would prefer Plan9.

On Fri, Jul 19, 2002 at 04:25:51AM +0100, matt wrote:
> I've been playing with httpd this evening and done what I think is a useful
> script.
>

<snip>
--
Bill
Amsterdam, NL

matt

unread,
Jul 19, 2002, 5:17:26 AM7/19/02
to

> Is httpd ported to Plan9? Is that what you are using?
> Just curious. Right now I have been doing things with
> php under Slackware but would prefer Plan9.

no, ip/httpd is it's own thing not Apache, no PHP here

man 8 httpd

or

http://plan9.bell-labs.com/magic/man2html/8/httpd

ari...@ar.aichi-u.ac.jp

unread,
Jul 19, 2002, 5:43:22 AM7/19/02
to

You have another option:
Look http://plan9.aichi-u.ac.jp/pegasus/eman-1.0/
I am afraid that document is poor.
Writing English is hard work for me.

To download: http://plan9.aichi-u.ac.jp/netlib/

William S.

unread,
Jul 19, 2002, 1:09:25 PM7/19/02
to
Your English looks and reads clear to me. Nice job
setting it up. It will take me a while to take it
all in.

My reason for using php and Sablotron is to present
web pages dynamically and keep content (XML) separate
from style (XSL).

Here is a link to a web site I have set up to
experiment and learn with. Sorry that this does not
directly pertain to Plan9 now but as I said, if I can
find a way to accomplish the same thing with Plan9
I will give it a go.

http://213.84.71.105/

--
Bill
Amsterdam, NL

0 new messages