ruby-changes:5475
From: shyouhei <ko1@a...>
Date: Sun, 8 Jun 2008 05:10:19 +0900 (JST)
Subject: [ruby-changes:5475] Ruby:r16978 (ruby_1_8_6): merge revision(s) 14153:
shyouhei 2008-06-08 05:08:44 +0900 (Sun, 08 Jun 2008) New Revision: 16978 Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/lib/cgi.rb branches/ruby_1_8_6/version.h Log: merge revision(s) 14153: * lib/cgi.rb (read_multipart): exclude blanks from header values. [ruby-list:44327] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=16978&r2=16977&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=16978&r2=16977&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/lib/cgi.rb?r1=16978&r2=16977&diff_format=u Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 16977) +++ ruby_1_8_6/ChangeLog (revision 16978) @@ -1,3 +1,8 @@ +Sun Jun 8 05:08:35 2008 Nobuyoshi Nakada <nobu@r...> + + * lib/cgi.rb (read_multipart): exclude blanks from header values. + [ruby-list:44327] + Sun Jun 8 05:02:25 2008 Nobuyoshi Nakada <nobu@r...> * bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 16977) +++ ruby_1_8_6/version.h (revision 16978) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-08" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20080608 -#define RUBY_PATCHLEVEL 156 +#define RUBY_PATCHLEVEL 157 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_6/lib/cgi.rb =================================================================== --- ruby_1_8_6/lib/cgi.rb (revision 16977) +++ ruby_1_8_6/lib/cgi.rb (revision 16978) @@ -1032,13 +1032,13 @@ if "--" == $2 content_length = -1 end - boundary_end = $2.dup + boundary_end = $2.dup "" end body.rewind - /Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;]*))/ni.match(head) + /Content-Disposition:.* filename=(?:"((?:\\.|[^\"\s])*)"|([^;\s]*))/ni.match(head) filename = ($1 or $2 or "") if /Mac/ni.match(env_table['HTTP_USER_AGENT']) and /Mozilla/ni.match(env_table['HTTP_USER_AGENT']) and @@ -1046,7 +1046,7 @@ filename = CGI::unescape(filename) end - /Content-Type: (.*)/ni.match(head) + /Content-Type: ([^\s]*)/ni.match(head) content_type = ($1 or "") (class << body; self; end).class_eval do @@ -1055,7 +1055,7 @@ define_method(:content_type) {content_type.dup.taint} end - /Content-Disposition:.* name="?([^\";]*)"?/ni.match(head) + /Content-Disposition:.* name="?([^\";\s]*)"?/ni.match(head) name = $1.dup if params.has_key?(name) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/