summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-14 07:32:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-14 07:32:00 +0000
commitf9d88c6059f8b3e512401790ad82574e12c8ccb1 (patch)
treea82eb6cdb9004ce7cf9ac817600d3255510b7f4c /lib
parent0638301255a0e2781edca0b1f6d1f23d76cd6d66 (diff)
merge revision(s) 48948: [Backport #10591]
* lib/net/http/response.rb (Net::HTTPResponse): require one or more spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> https://github.com/ruby/ruby/pull/782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http/response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index da3e4b4c8c..9aaa0b3208 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -37,7 +37,7 @@ class Net::HTTPResponse
def read_status_line(sock)
str = sock.readline
- m = /\AHTTP(?:\/(\d+\.\d+))?\s+(\d\d\d)\s*(.*)\z/in.match(str) or
+ m = /\AHTTP(?:\/(\d+\.\d+))?\s+(\d\d\d)(?:\s+(.*))?\z/in.match(str) or
raise Net::HTTPBadResponse, "wrong status line: #{str.dump}"
m.captures
end