...
|
...
|
@@ -508,27 +508,10 @@ class Body { |
|
|
* @time 2022/8/12 10:26
|
|
|
*/
|
|
|
private function preg_match_type($item){
|
|
|
$items = explode("\n",$item);
|
|
|
$ctstr = '';
|
|
|
foreach ($items as $str){
|
|
|
if($ctstr){
|
|
|
|
|
|
if(str_starts_with($str, "\t")){
|
|
|
$ctstr .= $str."\n";
|
|
|
}else{
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(str_starts_with($str, 'Content-Type:')){
|
|
|
$ctstr .= $str."\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 匹配内容 type
|
|
|
// preg_match("/Content-Type:[\w\W].*/i",$item,$result);
|
|
|
$result[0] = $ctstr;
|
|
|
$result[0] = $this->getTag($item,'Content-Type:');
|
|
|
if(!empty($result[0])){
|
|
|
$ret['origin'] = trim($result[0]);
|
|
|
// type
|
...
|
...
|
|