diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-22 20:18:35 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-22 20:23:14 +0000 |
commit | e69a5b17e386dd98aef3fe5d003c8bdc96ec7973 (patch) | |
tree | 3743ffbd01fec18eba233b093645744215c66226 /t/t0501-cramp-rainsocket.sh | |
parent | 7e4b39bff2e2a6d719f381c0021563df2b6689d1 (diff) | |
download | rainbows-e69a5b17e386dd98aef3fe5d003c8bdc96ec7973.tar.gz |
While gawk can handle binary data, other awks cannot, so use tr(1) to filter out non-printable characters from the WebSocket message. We need to send a bigger message, too, since tr(1) output is buffered and there's no portable way to unbuffer it :<
Diffstat (limited to 't/t0501-cramp-rainsocket.sh')
-rwxr-xr-x | t/t0501-cramp-rainsocket.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t0501-cramp-rainsocket.sh b/t/t0501-cramp-rainsocket.sh index 6e3aea4..a64145a 100755 --- a/t/t0501-cramp-rainsocket.sh +++ b/t/t0501-cramp-rainsocket.sh @@ -24,6 +24,7 @@ t_begin "setup and start" && { t_begin "wait for server to say hello to us" && { ok=$((curl --no-buffer -sS http://$listen/ || :) | \ + (tr -d '\0\0377' || :) | \ awk '/Hello from the Server/ { print "ok"; exit 0 }') test x"$ok" = xok |