diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 18:59:42 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-23 18:59:42 +0000 |
commit | f5dbd9dbec7efba4d9c25f39a619149533c3d4dd (patch) | |
tree | 65b4bf9b53d0174c37f73f05ab9c335f66c04643 /lib/net/http | |
parent | 1e65f0a59b3a32bc92213ccf3898c27ab80ba578 (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_2@48952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http')
-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 |