1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse

a quoted-string in a Content-Disposition value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2007-02-10 22:46:08 +00:00
parent 7634900b4e
commit 8b11e9e778
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sun Feb 11 07:42:25 2007 Akinori MUSHA <knu@iDaemons.org>
* lib/cgi.rb (CGI::QueryExtension::read_multipart): Properly parse
a quoted-string in a Content-Disposition value.
Sat Feb 10 20:21:29 2007 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface.

View file

@ -1034,8 +1034,8 @@ class CGI
body.rewind
/Content-Disposition:.* filename="?([^\";]*)"?/ni.match(head)
filename = ($1 or "")
/Content-Disposition:.* filename=(?:"((?:\\.|[^\"])*)"|([^;]*))/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']))