Method: Warc::Record#to_http
- Defined in:
- lib/warc/record.rb
#to_http ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/warc/record.rb', line 30 def to_http if @header["Content-Type"] == "application/http;msgtype=response" url = @header["WARC-Target-URI"] socket = Net::BufferedIO.new(content) r=Net::HTTPResponse.read_new(socket) r.reading_body(socket,true) {} return r end end |