diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 18:10:19 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 18:10:19 +0000 |
commit | 0f7e301fe12cdab3084a9a9e8c46113f327b9332 (patch) | |
tree | f34c132434cb3066ca3946c8b326b822af87b748 /lib/net | |
parent | 730c94172800dd3e4d6dbea42845b3c5500a8171 (diff) | |
download | ruby-0f7e301fe12cdab3084a9a9e8c46113f327b9332.tar.gz |
* 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/net')
-rw-r--r-- | lib/net/http/response.rb | 2 |
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 |