slitaz-base-files diff rootfs/usr/lib/slitaz/httphelper.sh @ rev 200
check i18n: make {pot,msgfmt,clean}
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Jul 01 19:03:44 2012 +0000 (2012-07-01) |
parents | 333e86ef0a8f |
children | 4b43ed13b73e |
line diff
1.1 --- a/rootfs/usr/lib/slitaz/httphelper.sh Thu Apr 12 22:23:20 2012 +0200 1.2 +++ b/rootfs/usr/lib/slitaz/httphelper.sh Sun Jul 01 19:03:44 2012 +0000 1.3 @@ -7,44 +7,14 @@ 1.4 # project and Busybox httpd server applet since it is used for URL 1.5 # [en|de]coding. 1.6 # 1.7 +# Documentation: man httphelper or /usr/share/doc/slitaz/httpelper.txt 1.8 +# 1.9 # Copyright (C) SliTaz 2012 - GNU gpl v2 1.10 # 1.11 1.12 alias urlencode='busybox httpd -e' 1.13 alias urldecode='busybox httpd -d' 1.14 1.15 -# Help and usage. 1.16 -httphelper() { 1.17 - cat << EOT 1.18 - 1.19 -Include this helper in a script: 1.20 - . /usr/lib/slitaz/httphelper 1.21 - 1.22 -Functions: 1.23 - GET [var [index]] 1.24 - POST [var [index]] 1.25 - COOKIE [var [index]] 1.26 - FILE [var {name|tmpname|size|type}] 1.27 - header [strings] 1.28 - http_urlencode string 1.29 - urlencode string 1.30 - urldecode string 1.31 - htmlentities string 1.32 - md5crypt string 1.33 - sha512crypt string 1.34 - httpinfo 1.35 - httphelper 1.36 - 1.37 -Example: 1.38 - header "Content-type: text/html" "Set-Cookie: name=value; HttpOnly" 1.39 - 1.40 - if [ "\$(GET name)" ]; then 1.41 - echo "Input name has a value from HTML form" 1.42 - fi 1.43 - 1.44 -EOT 1.45 -} 1.46 - 1.47 # Send headers. 1.48 header() { 1.49 local i