Skip to content

Commit

Permalink
r22164@crimson: knu | 2009-02-09 11:52:38 +0900
Browse files Browse the repository at this point in the history
 (OpenURI::Meta#content_type_parse): fix tests. [ruby-dev:33336]
 (r15200)


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@22157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Feb 9, 2009
1 parent d6840e0 commit 77396a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion 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)
Expand All @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion lib/open-uri.rb
Expand Up @@ -430,7 +430,7 @@ def content_type_parse # :nodoc:
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]
Expand Down

0 comments on commit 77396a5

Please sign in to comment.