From ee1717dc3e0b5409634e86870464fb9c5c32dbd2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 9 Dec 2007 03:39:04 +0000 Subject: * lib/cgi.rb (read_multipart): exclude blanks from header values. [ruby-list:44327] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/cgi.rb | 8 ++++---- version.h | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c58556870e..9953ca6fc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 9 12:39:01 2007 Nobuyoshi Nakada + + * lib/cgi.rb (read_multipart): exclude blanks from header values. + [ruby-list:44327] + Wed Dec 5 23:38:50 2007 Nobuyoshi Nakada * range.c (range_each): followed step_i change. diff --git a/lib/cgi.rb b/lib/cgi.rb index a442d44930..ccc48d8836 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1032,13 +1032,13 @@ class CGI 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 @@ class CGI 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 @@ class CGI 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) diff --git a/version.h b/version.h index 6482143381..346bcd8a32 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2007-12-05" +#define RUBY_RELEASE_DATE "2007-12-09" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20071205 +#define RUBY_RELEASE_CODE 20071209 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 5 +#define RUBY_RELEASE_DAY 9 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- cgit v1.2.3