aboutsummaryrefslogtreecommitdiff
path: root/docs/cgi/cl.html
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-02-11 14:52:07 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-02-11 14:52:07 +0000
commit5614b1d6f3e1a5c137f431999fbbb38ce8cb8db8 (patch)
tree81c556d1a136112be07bbd2c19293e65fad03cdd /docs/cgi/cl.html
parent976559a7cdd9338f3b3975690ca8fe072b6eb126 (diff)
downloadbusybox-w32-5614b1d6f3e1a5c137f431999fbbb38ce8cb8db8.tar.gz
busybox-w32-5614b1d6f3e1a5c137f431999fbbb38ce8cb8db8.tar.bz2
busybox-w32-5614b1d6f3e1a5c137f431999fbbb38ce8cb8db8.zip
Add CGI docs
git-svn-id: svn://busybox.net/trunk/busybox@17853 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'docs/cgi/cl.html')
-rw-r--r--docs/cgi/cl.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/cgi/cl.html b/docs/cgi/cl.html
new file mode 100644
index 000000000..5779d623e
--- /dev/null
+++ b/docs/cgi/cl.html
@@ -0,0 +1,46 @@
1<html><head><title>CGI Command line options</title></head><body><h1><img alt="" src="cl_files/CGIlogo.gif"> CGI Command line options</h1>
2<hr> <p>
3
4</p><h2>Specification</h2>
5
6The command line is only used in the case of an ISINDEX query. It is
7not used in the case of an HTML form or any as yet undefined query
8type. The server should search the query information (the <code>QUERY_STRING</code> environment variable) for a non-encoded
9= character to determine if the command line is to be used, if it
10finds one, the command line is not to be used. This trusts the clients
11to encode the = sign in ISINDEX queries, a practice which was
12considered safe at the time of the design of this specification. <p>
13
14For example, use the <a href="http://hoohoo.ncsa.uiuc.edu/cgi-bin/finger">finger script</a> and the ISINDEX interface to look up "httpd". You will see that the script will call itself with <code>/cgi-bin/finger?httpd</code> and will actually execute "finger httpd" on the command line and output the results to you.
15</p><p>
16If the server does find a "=" in the <code>QUERY_STRING</code>,
17then the command line will not be used, and no decoding will be
18performed. The query then remains intact for processing by an
19appropriate FORM submission decoder.
20Again, as an example, use <a href="http://hoohoo.ncsa.uiuc.edu/cgi-bin/finger?httpd=name">this hyperlink</a> to submit <code>"httpd=name"</code> to the finger script. Since this <code>QUERY_STRING</code>
21contained an unencoded "=", nothing was decoded, the script didn't know
22it was being submitted a valid query, and just gave you the default
23finger form.
24</p><p>
25If the server finds that it cannot send the string due to internal
26limitations (such as exec() or /bin/sh command line restrictions) the
27server should include NO command line information and provide the
28non-decoded query information in the environment
29variable <a href="http://hoohoo.ncsa.uiuc.edu/cgi/env.html#query"><code>QUERY_STRING</code></a>. </p><p>
30</p><hr>
31<h2>Examples</h2>
32
33Examples of the command line usage are much better <a href="http://hoohoo.ncsa.uiuc.edu/cgi/examples.html">demonstrated</a> than explained. For these
34examples, pay close attention to the script output which says what
35argc and argv are. <p>
36
37</p><hr>
38
39<a href="http://hoohoo.ncsa.uiuc.edu/cgi/interface.html"><img alt="[Back]" src="cl_files/back.gif">Return to the
40interface specification</a> <p>
41
42CGI - Common Gateway Interface
43</p><address><a href="http://hoohoo.ncsa.uiuc.edu/cgi/mailtocgi.html">cgi@ncsa.uiuc.edu</a></address>
44
45
46</body></html> \ No newline at end of file