From: Kevin Clark Date: Wed, 18 Jun 2008 01:09:53 +0000 (+0000) Subject: Stop using deprecated classes in SimpleMongrelHTTPServer X-Git-Tag: 0.2.0~587 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=1ca1950f9bdbe555a59c2b49d90fe0b025418483;p=common%2Fthrift.git Stop using deprecated classes in SimpleMongrelHTTPServer git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668962 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/server/httpserver.rb b/lib/rb/lib/thrift/server/httpserver.rb index c92e0cad..8763e4c5 100644 --- a/lib/rb/lib/thrift/server/httpserver.rb +++ b/lib/rb/lib/thrift/server/httpserver.rb @@ -20,7 +20,7 @@ module Thrift end response.start(200) do |head, out| head["Content-Type"] = "application/x-thrift" - transport = TIOStreamTransport.new request.body, out + transport = IOStreamTransport.new request.body, out protocol = @protocol_factory.get_protocol transport @processor.process protocol, protocol end @@ -31,7 +31,7 @@ module Thrift port = opts[:port] || 80 ip = opts[:ip] || "0.0.0.0" path = opts[:path] || "" - protocol_factory = opts[:protocol_factory] || TBinaryProtocolFactory.new + protocol_factory = opts[:protocol_factory] || BinaryProtocolFactory.new @server = Mongrel::HttpServer.new ip, port @server.register "/#{path}", Handler.new(processor, protocol_factory) end