From: Minero Aoki Date: 2001-02-23T03:22:20+09:00 Subject: [ruby-list:28168] Re: net/http で、 HTTPBadResponse あおきです。 In mail "[ruby-list:28153] net/http で、 HTTPBadResponse" Beyond wrote: > はじめまして。Beyondと申します。 > よろしくお願いいたします。 > > さて、あおきさんの net/http (1.1.32) を使っているのですが、head と get > を連続でやろうとすると、幾つかのサイトで HTTPBadResponse の例外が発生し > ます。例外が発生するコードは testhttp.rb の様になります。head だけ、get > だけだと正常に動きます。 すみません、バグです。最小のパッチは以下のとおりです。 ------------------------------------------------------------------- 青木峰郎 --- protocol.rb 2001/02/07 16:51:44 1.10 +++ protocol.rb 2001/02/22 18:26:10 @@ -515,8 +515,8 @@ def reopen( otime = nil ) unless closed? then close - @buffer = '' end + @buffer = '' timeout( otime ) { @socket = TCPsocket.new( @addr, @port ) }