# HG changeset patch # User Christophe Lincoln # Date 1332028476 -3600 # Node ID f1e33b9fb90dc7512099284112a26674211ef7be # Parent 152948bea1dc95ecfa287c40842ae95466332031 Moved cgi-bin files to slitaz-base-files (They can be used by any CGI compliant webserver not only BB httpd applet) diff -r 152948bea1dc -r f1e33b9fb90d busybox/stuff/applications/httpd-cgi.desktop --- a/busybox/stuff/applications/httpd-cgi.desktop Sun Mar 18 00:36:21 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=CGI SHell Environment -Exec=browser http://localhost/cgi-env.sh -Icon=text-x-script -Type=Application -Categories=Application;Development; diff -r 152948bea1dc -r f1e33b9fb90d busybox/stuff/www/cgi-bin/index.cgi --- a/busybox/stuff/www/cgi-bin/index.cgi Sun Mar 18 00:36:21 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -#!/bin/sh - -[ ! -d ..$QUERY_STRING ] && echo "HTTP/1.1 404 Not Found" || cat < - - - Index of $QUERY_STRING - - - - - - - - -
- -
    -$({ [ "$QUERY_STRING" != "/" ] && echo "../"; ls -p ..$QUERY_STRING; } | \ - sed 's|.*|
  • &
  • |') -
-
- - - - - - -EOT diff -r 152948bea1dc -r f1e33b9fb90d busybox/stuff/www/cgi-env.sh --- a/busybox/stuff/www/cgi-env.sh Sun Mar 18 00:36:21 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -#!/bin/sh -. /usr/bin/httpd_helper.sh -header - -cat << EOT - - - - CGI SHell Environment - - - - - - - - - -
- -

- Welcome to the SliTaz web server CGI Shell environment. Let the power of - SHell script meet the web! Here you can check HTTP info and try some - requests. -

-

- Including /usr/bin/httpd_helper.sh in your scripts lets you - use PHP-like syntax such as: \$(GET var) -

-

- QUERY_STRING test: - $SCRIPT_NAME?var=value -

- -

HTTP Info

-
-$(httpinfo)
-
- - -
- - - -EOT - -exit 0