diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-02 01:18:37 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-02 01:18:37 +0000 |
commit | 8bb21af72cfac5301eeeb7593837be4960d2b316 (patch) | |
tree | 57ba42cc724545517c43837b7fa362f280325264 | |
parent | a100707c04a41510bfe3460bf15a88c339ce4f30 (diff) | |
download | busybox-w32-8bb21af72cfac5301eeeb7593837be4960d2b316.tar.gz busybox-w32-8bb21af72cfac5301eeeb7593837be4960d2b316.tar.bz2 busybox-w32-8bb21af72cfac5301eeeb7593837be4960d2b316.zip |
httpd: directory indexer example doesn't need piping thru dd anymore
-rw-r--r-- | networking/httpd_index_cgi_example | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/networking/httpd_index_cgi_example b/networking/httpd_index_cgi_example index 31e768c70..9c8e022a6 100644 --- a/networking/httpd_index_cgi_example +++ b/networking/httpd_index_cgi_example | |||
@@ -23,10 +23,6 @@ cd "${QUERY_STRING:1}" 2>/dev/null || exit 1 | |||
23 | f=`dirname "$QUERY_STRING"` | 23 | f=`dirname "$QUERY_STRING"` |
24 | test "$f" = "/" && f="" | 24 | test "$f" = "/" && f="" |
25 | 25 | ||
26 | # Pipe thru dd (need to write header as single write(), | ||
27 | # or else httpd doesn't see "Content-type: text/html" | ||
28 | # in first read() and decides that it is not html) | ||
29 | { | ||
30 | printf "%s" \ | 26 | printf "%s" \ |
31 | $'HTTP/1.0 200 OK\r\n'\ | 27 | $'HTTP/1.0 200 OK\r\n'\ |
32 | $'Content-type: text/html\r\n\r\n'\ | 28 | $'Content-type: text/html\r\n\r\n'\ |
@@ -52,4 +48,3 @@ for f in *; do | |||
52 | } | 48 | } |
53 | done | 49 | done |
54 | printf "</table></pre><hr></body></html>"$'\r\n' | 50 | printf "</table></pre><hr></body></html>"$'\r\n' |
55 | } | dd bs=4k | ||