about summary refs log tree commit
path: root/lib/metropolis/tc/hdb/ro.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/metropolis/tc/hdb/ro.rb')
-rw-r--r--lib/metropolis/tc/hdb/ro.rb18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/metropolis/tc/hdb/ro.rb b/lib/metropolis/tc/hdb/ro.rb
index 4114606..fddd73c 100644
--- a/lib/metropolis/tc/hdb/ro.rb
+++ b/lib/metropolis/tc/hdb/ro.rb
@@ -1,6 +1,8 @@
 # -*- encoding: binary -*-
 
 module Metropolis::TC::HDB::RO
+  include Metropolis::Common::RO
+
   def self.extended(obj)
    obj.instance_eval do
       @wr_flags = nil
@@ -12,22 +14,6 @@ module Metropolis::TC::HDB::RO
     end
   end
 
-  def call(env)
-    if %r{\A/(.*)\z} =~ env["PATH_INFO"]
-      key = unescape($1)
-      case env["REQUEST_METHOD"]
-      when "GET"
-        get(key)
-      when "HEAD"
-        head(key)
-      else
-        r(403)
-      end
-    else # OPTIONS
-      r(405)
-    end
-  end
-
   def reader(key)
     yield @ro_dbv[key.hash % @nr_slots]
   end