From 8bb21af72cfac5301eeeb7593837be4960d2b316 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 2 Feb 2007 01:18:37 +0000 Subject: [PATCH] httpd: directory indexer example doesn't need piping thru dd anymore --- networking/httpd_index_cgi_example | 5 ----- 1 file changed, 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 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 "
"$'\r\n' -} | dd bs=4k -- 2.25.1