diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-11-30 15:04:57 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-11-30 15:04:57 -0800 |
commit | 000726f5302f18ff095c68dfedf1547d0946209c (patch) | |
tree | 2798c9b097bffe8a85ead6da2c391363b7b80d6a /lib/metropolis/tc/hdb.rb | |
parent | 61120b1268679bb8ffa157736e91e6846fd2a372 (diff) | |
download | metropolis-000726f5302f18ff095c68dfedf1547d0946209c.tar.gz |
internal API: get and head methods require env
We'll need it for implementing the deflater/inflater
Diffstat (limited to 'lib/metropolis/tc/hdb.rb')
-rw-r--r-- | lib/metropolis/tc/hdb.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/metropolis/tc/hdb.rb b/lib/metropolis/tc/hdb.rb index ce6d13a..09d6439 100644 --- a/lib/metropolis/tc/hdb.rb +++ b/lib/metropolis/tc/hdb.rb @@ -124,13 +124,13 @@ module Metropolis::TC::HDB r(200) end - def head(key) + def head(key, env) size = reader(key) { |hdb| hdb.vsiz(key) or ex!(:vsiz, hdb) } 0 > size and return r(404, "") [ 200, { 'Content-Length' => size.to_s }.merge!(@headers), [] ] end - def get(key) + def get(key, env) value = nil reader(key) do |hdb| unless value = hdb.get(key) |