summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-23 18:10:19 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-23 18:10:19 +0000
commit0f7e301fe12cdab3084a9a9e8c46113f327b9332 (patch)
treef34c132434cb3066ca3946c8b326b822af87b748 /lib
parent730c94172800dd3e4d6dbea42845b3c5500a8171 (diff)
* 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/trunk@48948 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 777aca9e45..b0731694ca 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