about summary refs log tree commit homepage
path: root/t/t0023-sendfile-byte-range.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-30 08:32:21 +0000
committerEric Wong <normalperson@yhbt.net>2011-01-04 16:21:17 -0800
commitdc77752eb7bfe528c60dc0ac028717877342e22a (patch)
tree32987105ac9d56b53ea18966d5e56ec1dbf6b9b4 /t/t0023-sendfile-byte-range.sh
parent5c5aea99a57d07c1d0e0ea471b62acf2852526c7 (diff)
downloadrainbows-dc77752eb7bfe528c60dc0ac028717877342e22a.tar.gz
After beefing up and enabling byte range tests for "sendfile"
(and no just IO.copy_stream), we noticed threaded-Coolio
variants did not handle invalid byte ranges correctly.
Diffstat (limited to 't/t0023-sendfile-byte-range.sh')
-rwxr-xr-xt/t0023-sendfile-byte-range.sh34
1 files changed, 2 insertions, 32 deletions
diff --git a/t/t0023-sendfile-byte-range.sh b/t/t0023-sendfile-byte-range.sh
index 419d89a..89fbd7a 100755
--- a/t/t0023-sendfile-byte-range.sh
+++ b/t/t0023-sendfile-byte-range.sh
@@ -17,7 +17,7 @@ EventMachine|NeverBlock)
 *) ;;
 esac
 
-t_plan 7 "sendfile byte range response for $model"
+t_plan 12 "sendfile byte range response for $model"
 
 t_begin "setup and startup" && {
         rtmpfiles out err
@@ -28,36 +28,6 @@ t_begin "setup and startup" && {
         # can't load Rack::Lint here since it clobbers body#to_path
         rainbows -E none -D large-file-response.ru -c $unicorn_config
         rainbows_wait_start
-        range_head=-r-365
-        range_tail=-r155-
-        range_mid=-r200-300
 }
 
-t_begin "read random blob sha1s" && {
-        sha1_head=$(curl -sSf $range_head file://random_blob | rsha1)
-        sha1_tail=$(curl -sSf $range_tail file://random_blob | rsha1)
-        sha1_mid=$(curl -sSf $range_mid file://random_blob | rsha1)
-}
-
-t_begin "head range matches" && {
-        sha1="$(curl -sSv $range_head http://$listen/random_blob | rsha1)"
-        test x"$sha1_head" = x"$sha1"
-}
-
-t_begin "tail range matches" && {
-        sha1="$(curl -sS $range_tail http://$listen/random_blob | rsha1)"
-        test x"$sha1_tail" = x"$sha1"
-}
-
-t_begin "mid range matches" && {
-        sha1="$(curl -sS $range_mid http://$listen/random_blob | rsha1)"
-        test x"$sha1_mid" = x"$sha1"
-}
-
-t_begin "shutdown server" && {
-        kill -QUIT $rainbows_pid
-}
-
-t_begin "check stderr" && check_stderr
-
-t_done
+. ./byte-range-common.sh