elinks-0.11.4rc1
[elinks/elinks-j605.git] / test / cgi / print-vars.sh
blob449dd70a97995debec0ac3f6249a7a5629916212
1 #!/bin/sh
3 # Print all variables set by ELinks
6 cat <<EOF
7 Content-Type: text/html
9 <html>
10 <head><title>CGI variables</title></head>
11 <body><table>
12 EOF
14 for var in \
15 CONTENT_LENGTH \
16 GATEWAY_INTERFACE \
17 HTTP_ACCEPT \
18 HTTP_ACCEPT_LANGUAGE \
19 HTTP_CACHE_CONTROL \
20 HTTP_COOKIE \
21 HTTP_IF_MODIFIED_SINCE \
22 HTTP_PRAGMA \
23 HTTP_REFERER \
24 HTTP_USER_AGENT \
25 PATH_TRANSLATED \
26 QUERY_STRING \
27 REDIRECT_STATUS \
28 REMOTE_ADDR \
29 REQUEST_METHOD \
30 SCRIPT_FILENAME \
31 SCRIPT_NAME \
32 SERVER_NAME \
33 SERVER_PROTOCOL \
34 SERVER_SOFTWARE;
36 eval val=$`echo $var`
37 echo "<tr><td><em>$var</em></td><td>$val</td></tr>";
38 done
40 cat <<EOF
41 </table>
42 </body>
43 </html>
44 EOF