Bug #1796 ยป open_uri_multiline_headers.patch
/mirai/SOFT/ruby/1.8.7/lib/ruby/1.8/net/http.rb 2009-09-01 17:36:05.000000000 +0200 | ||
---|---|---|
while true
|
||
line = sock.readuntil("\n", true).sub(/\s+\z/, '')
|
||
break if line.empty?
|
||
m = /\A([^:]+):\s*/.match(line) or
|
||
raise HTTPBadResponse, 'wrong header line format'
|
||
m = /\A([^:]+):\s*/.match(line) or next
|
||
yield m[1], m.post_match
|
||
end
|
||
end
|