about summary refs log tree commit
path: root/lib/metropolis/tc/hdb.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-11-23 12:51:38 -0800
committerEric Wong <normalperson@yhbt.net>2010-11-23 12:51:54 -0800
commite232eef239952d94220d87ae9be5b27690fe6699 (patch)
tree9ac421eab03cf39852abf6ef372d3e3fdb03004a /lib/metropolis/tc/hdb.rb
parente83353f18f4813365581be81672eaf2e3c2e3d3a (diff)
downloadmetropolis-e232eef239952d94220d87ae9be5b27690fe6699.tar.gz
add generic Rack read/write test
This fixes 404s on HEAD requests which do not return a body.
Diffstat (limited to 'lib/metropolis/tc/hdb.rb')
-rw-r--r--lib/metropolis/tc/hdb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/metropolis/tc/hdb.rb b/lib/metropolis/tc/hdb.rb
index 11bc65d..eed46ef 100644
--- a/lib/metropolis/tc/hdb.rb
+++ b/lib/metropolis/tc/hdb.rb
@@ -109,7 +109,7 @@ module Metropolis::TC::HDB
 
   def head(key)
     size = reader(key) { |hdb| hdb.vsiz(key) or ex!(:vsiz, hdb) }
-    0 > size and return r(404)
+    0 > size and return r(404, "")
     [ 200, { 'Content-Length' => size.to_s }.merge!(@headers), [] ]
   end