summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-09 03:16:43 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-09 03:16:43 +0000
commit133156e30e50d937718f117ab3957ddc2db84e29 (patch)
treec6fc749ef480eb38e9c212a0d8fc5e6636f91b01
parent4c3e5f2c56ebca1d325f71a83997049c6b5deda0 (diff)
r22164@crimson: knu | 2009-02-09 11:52:38 +0900
(OpenURI::Meta#content_type_parse): fix tests. [ruby-dev:33336] (r15200) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/open-uri.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e00d84605d..db17a8d859 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Sun Feb 9 11:43:37 2009 Akinori MUSHA <knu@iDaemons.org>
+Mon Feb 9 11:50:02 2009 Akinori MUSHA <knu@iDaemons.org>
* lib/open-uri.rb: add :read_timeout option.
[ruby-core:4848] (r9166)
@@ -15,6 +15,8 @@ Sun Feb 9 11:43:37 2009 Akinori MUSHA <knu@iDaemons.org>
(OpenURI::HTTPRedirect): new exception class for
redirection. (r13788)
(OpenURI::Buffer): use Meta ===. [ruby-core:14295] (r14609)
+ (OpenURI::Meta#content_type_parse): fix
+ tests. [ruby-dev:33336] (r15200)
Mon Feb 9 01:21:16 2009 Tanaka Akira <akr@fsij.org>
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index fa93ff140d..69232bf366 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -430,7 +430,7 @@ module OpenURI
subtype = $2.downcase
parameters = []
$3.scan(/;#{RE_LWS}?(#{RE_TOKEN})#{RE_LWS}?=#{RE_LWS}?(?:(#{RE_TOKEN})|(#{RE_QUOTED_STRING}))/no) {|att, val, qval|
- val = qval.gsub(/[\r\n\t !#-\[\]-~\x80-\xff]+|(\\[\x00-\x7f])/) { $1 ? $1[1,1] : $& } if qval
+ val = qval.gsub(/[\r\n\t !#-\[\]-~\x80-\xff]+|(\\[\x00-\x7f])/n) { $1 ? $1[1,1] : $& } if qval
parameters << [att.downcase, val]
}
["#{type}/#{subtype}", *parameters]