From: Ian Macdonald Date: 2004-03-05T20:02:05+09:00 Subject: Re: problem with Net::HTTP in 1.8.1 On Fri 05 Mar 2004 at 19:38:42 +0900, Minero Aoki wrote: > Hi, > > In mail "Re: problem with Net::HTTP in 1.8.1" > Ian Macdonald wrote: > > > > > puts response.header > > > > > > > > > > > > This causes the following bogus message to be printed indefinitely: > > > The patch fixes the recursive error, but I still can't get access to the > > @header hash. It seems that trying to read @header returns self, so that > > I end up with .header.header.header, etc. and can't actually dereference > > the hash. > > Use HTTPResponse#[] to access header fields. > If you want to get all fields at once, try #to_hash. > > HTTPResponse#header is a very old method and is deprecated. > Its name is really misunderstanding, but it is needed to > keep backward compatibility. Thanks for the help. Ian -- Ian Macdonald | Don't compare floating point numbers solely System Administrator | for equality. ian@caliban.org | http://www.caliban.org | |