浏览代码

fixed: Upload file support Chinese name

weiwei163@foxmail.com 4 年之前
父节点
当前提交
d743111c69
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Protocols/Http/Request.php

+ 1 - 1
Protocols/Http/Request.php

@@ -504,7 +504,7 @@ class Request
                 switch ($header_key) {
                     case "content-disposition":
                         // Is file data.
-                        if (\preg_match('/name="(.*?)"; filename="(.*?)"$/i', $header_value, $match)) {
+                        if (\preg_match('/name="(.*?)"; filename="(.*?)"/i', $header_value, $match)) {
                             $error = 0;
                             $tmp_file = '';
                             $size = \strlen($boundary_value);