Re: Using $ for CGI script arguments?

On Tue, 18 Feb 1997, Simone Demmel wrote:

> Hi,
> 
> Francois Pottier wrote:
> [...]
> > RFC 2068 (the HTTP/1.1 standard) says that at the end of the path, we
> [...]
> >   http://myserver.mydomain/pathsegment/scriptname;args?query
> [..but..]
> >   http://myserver.mydomain/pathsegment/scriptname$args?query
> [...]
> > So, my question is, what's the consensus? What are the respective
> > roles of the semicolon and of the dollar signs? Can they be used
> > interchangeably, or do they have different meanings? Should my parser
> > look out for both of them, and if so, in what order? etc.
> 
> Good question, here are some more Possibilities:
> http://myserver.mydomain/path/info.html#5    (<a name>-Links in html-Files)
> http://myserver.mydomain/pathsegment/scriptname?arg1=x&arg2=y
> 

 
In Apache, NCSA httpd etc. (HTTP1.0)
sending an HTML form with action = http://some.org/cgi-bin/script/path
and two fields named P1, P2 filled with values value1, value2 will 
generate a URL
 http://some.org/cgi-bin/script/path?P1=value1&P2=value2
which inside the script "script" will have the environment variables
PATH_INFO = "/path"
QUERY_STRING = "P1=value1&P2=value2"
SCRIPT_FILENAME = "/usr/local/etc/httpd/cgi-bin/script"
and the script command-line argument also set to P1=value1&P2=value2
When I tried sending a query with a "#" in, that and later characters were
stripped off.

Apache 1.1 on Unix treats ";" and "$" as part of the script filename. 
I haven't tried 1.2 (HTTP/1.1) yet.
BTW, "~" though illegal is used on Unix for personal homepages, and "," 
is generated from server-side imagemaps

Andrew
http://Vancouver-Webpages.com

Received on Wednesday, 26 February 1997 17:58:21 UTC