about summary refs log tree commit homepage
path: root/t/t0019-max_header_len.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-02-04 12:29:00 +0000
committerEric Wong <normalperson@yhbt.net>2013-02-04 12:31:05 +0000
commit2a2163594ea2b515e98fbe9f909bcf90e4c35fe8 (patch)
treecdfb5fd65bd1850dba45362a81350da6ee0ae7d0 /t/t0019-max_header_len.sh
parent85223902e8229bd460ce0b4ad126f42b1db42a46 (diff)
downloadunicorn-2a2163594ea2b515e98fbe9f909bcf90e4c35fe8.tar.gz
On FreeBSD 9.0, "wc -c" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.

This is commit 8a6117a22a7d01eeb5adc63d3152acf435cd3176
in rainbows.git
Diffstat (limited to 't/t0019-max_header_len.sh')
-rwxr-xr-xt/t0019-max_header_len.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t0019-max_header_len.sh b/t/t0019-max_header_len.sh
index 5ce1c69..6a355b4 100755
--- a/t/t0019-max_header_len.sh
+++ b/t/t0019-max_header_len.sh
@@ -5,7 +5,7 @@ t_plan 5 "max_header_len setting (only intended for Rainbows!)"
 t_begin "setup and start" && {
         unicorn_setup
         req='GET / HTTP/1.0\r\n\r\n'
-        len=$(printf "$req" | wc -c)
+        len=$(printf "$req" | count_bytes)
         echo Unicorn::HttpParser.max_header_len = $len >> $unicorn_config
         unicorn -D -c $unicorn_config env.ru
         unicorn_wait_start