projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a100707
)
httpd: directory indexer example doesn't need piping thru dd anymore
author
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 2 Feb 2007 01:18:37 +0000
(
01:18
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 2 Feb 2007 01:18:37 +0000
(
01:18
-0000)
networking/httpd_index_cgi_example
patch
|
blob
|
history
diff --git
a/networking/httpd_index_cgi_example
b/networking/httpd_index_cgi_example
index 31e768c70351ecf8e03c91e9eaab097f618def06..9c8e022a61e5ba1eb390b8145b16ca414bd5594a 100644
(file)
--- 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
f=`dirname "$QUERY_STRING"`
test "$f" = "/" && f=""
-# Pipe thru dd (need to write header as single write(),
-# or else httpd doesn't see "Content-type: text/html"
-# in first read() and decides that it is not html)
-{
printf "%s" \
$'HTTP/1.0 200 OK\r\n'\
$'Content-type: text/html\r\n\r\n'\
@@
-52,4
+48,3
@@
for f in *; do
}
done
printf "</table></pre><hr></body></html>"$'\r\n'
-} | dd bs=4k