ruby-changes:5474
From: shyouhei <ko1@a...>
Date: Sun, 8 Jun 2008 05:08:25 +0900 (JST)
Subject: [ruby-changes:5474] Ruby:r16976 (ruby_1_8_5): merge revision(s) 14153:
shyouhei 2008-06-08 05:08:13 +0900 (Sun, 08 Jun 2008)
New Revision: 16976
Modified files:
branches/ruby_1_8_5/ChangeLog
branches/ruby_1_8_5/lib/cgi.rb
branches/ruby_1_8_5/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_5/lib/cgi.rb?r1=16976&r2=16975&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/version.h?r1=16976&r2=16975&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=16976&r2=16975&diff_format=u
Index: ruby_1_8_5/ChangeLog
===================================================================
--- ruby_1_8_5/ChangeLog (revision 16975)
+++ ruby_1_8_5/ChangeLog (revision 16976)
@@ -1,3 +1,8 @@
+Sun Jun 8 05:05:05 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * lib/cgi.rb (read_multipart): exclude blanks from header values.
+ [ruby-list:44327]
+
Sun Jun 8 05:00:44 2008 Nobuyoshi Nakada <nobu@r...>
* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezing
Index: ruby_1_8_5/version.h
===================================================================
--- ruby_1_8_5/version.h (revision 16975)
+++ ruby_1_8_5/version.h (revision 16976)
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-08"
#define RUBY_VERSION_CODE 185
#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_5/lib/cgi.rb
===================================================================
--- ruby_1_8_5/lib/cgi.rb (revision 16975)
+++ ruby_1_8_5/lib/cgi.rb (revision 16976)
@@ -1032,21 +1032,21 @@
if "--" == $2
content_length = -1
end
- boundary_end = $2.dup
+ boundary_end = $2.dup
""
end
body.rewind
- /Content-Disposition:.* filename="?([^\";]*)"?/ni.match(head)
- filename = ($1 or "")
+ /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
(not /MSIE/ni.match(env_table['HTTP_USER_AGENT']))
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/