Permalink
Browse files

fixed bug which caused head to produce an error when $n == 0

  • Loading branch information...
1 parent f14b2a1 commit 12bffc44fc7de9d7b1df0d62c93cc094795e6e10 @micha committed Mar 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/lilhttpd
View
@@ -14,7 +14,7 @@ while read a; do
[ "$a" = "" ] && break
done
-r=$(printf "%s\\n%s" "$r" "$(head -c ${n:-0})")
+[ -n "$n" ] && r=$(printf "%s\\n%s" "$r" "$(head -c $n)")
if [ "$reflect" = "yes" ]; then
ct="text/plain"

0 comments on commit 12bffc4

Please sign in to comment.