wok rev 9514

busybox/httpd: allow multiple headers
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 06 17:03:44 2011 +0200 (2011-04-06)
parents 8e1ed7cbcb1b
children a8b2e8fbc7f6
files busybox/stuff/httpd_helper.sh tazwikiss/receipt
line diff
     1.1 --- a/busybox/stuff/httpd_helper.sh	Wed Apr 06 16:56:33 2011 +0200
     1.2 +++ b/busybox/stuff/httpd_helper.sh	Wed Apr 06 17:03:44 2011 +0200
     1.3 @@ -7,9 +7,12 @@
     1.4  
     1.5  alias urlencode='httpd -e'
     1.6  
     1.7 +# Send headers, example :
     1.8 +# header "Content-type: text/html" "Set-Cookie: name=value; HttpOnly"
     1.9  header()
    1.10  {
    1.11 -[ -z "$1" ] && echo -e "Content-type: text/html\r\n" || echo -e "$1\r\n"
    1.12 +[ -z "$1" ] && set -- "Content-type: text/html"
    1.13 +for i in "$@" "" ; do echo -e "$i\r"; done
    1.14  }
    1.15  
    1.16  htmlentities()
     2.1 --- a/tazwikiss/receipt	Wed Apr 06 16:56:33 2011 +0200
     2.2 +++ b/tazwikiss/receipt	Wed Apr 06 17:03:44 2011 +0200
     2.3 @@ -68,6 +68,10 @@
     2.4  			cat > $1/etc/httpd.conf <<EOT
     2.5  H:/var/www
     2.6  A:0.0.0.0/0
     2.7 +.xml:text/xml
     2.8 +.tgz:application/x-tgz
     2.9 +.tar.gz:application/x-tgz
    2.10 +.tazpkg:application/x-tazpkg
    2.11  EOT
    2.12  		fi
    2.13  		while read line; do