CGI/1.0 tweaks

George Phillips <>
Date:  7 Dec 93 12:14 -0800
From: George Phillips <>
Message-id: <7009*>
Subject: CGI/1.0 tweaks
So here I sit implementing my x-exec: URL scheme which I wish to make
compliant with CGI/1.0.  Naturally, I've run into a few problems.
First the no-brainer:  HTTP_ACCEPT -- since HTTP is going to change
to the proper MIME field separator (either , or ;), so should CGI.

I ran into a slightly stickier problem which doesn't necessarily
affect the spec but does have some implications for script writers.
It's the business about self-referencing URLs.  Think of a gateway
which serves some abstract URL sub-tree.  The gateway can do
absolute references in that tree with URLs of the form:

(1)	$SCRIPT_NAME/gateway/sub/tree

Now, we also have SERVER_NAME and SERVER_PORT so the gateway could

(2)	//$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME/gateway/sub/tree

if it wanted to be pedantic.  So why the extra variables?  Because
gopher requests need them in order to do self-references.  In other
words, they're useless unless your SERVER_PROTOCOL is "gopher".

What should the spec say?  Well, we could drop them or we could
say they're only set if the protocol is "gopher".  Either way
is fine by me.  What I feel is necessary is that (1) be _the_
method for self-referencing URLs.  That way, gateway scripts
can be used nicely as x-exec: scripts with 0 changes.

			-- George