File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,7 @@ protected static function parseUploadFiles(string $http_body, string $http_post_
488
488
unset($ boundary_data_array [0 ]);
489
489
}
490
490
$ key = -1 ;
491
+ $ post_encode_string = '' ;
491
492
foreach ($ boundary_data_array as $ boundary_data_buffer ) {
492
493
list ($ boundary_header_buffer , $ boundary_value ) = \explode ("\r\n\r\n" , $ boundary_data_buffer , 2 );
493
494
// Remove \r\n from the end of buffer.
@@ -512,7 +513,7 @@ protected static function parseUploadFiles(string $http_body, string $http_post_
512
513
else {
513
514
// Parse $_POST.
514
515
if (\preg_match ('/name="(.*?)"$/ ' , $ header_value , $ match )) {
515
- $ _POST [ $ match [1 ]] = $ boundary_value ;
516
+ $ post_encode_string .= urlencode ( $ match [1 ]) . ' = ' . urlencode ( $ boundary_value) . ' & ' ;
516
517
}
517
518
}
518
519
break ;
@@ -522,6 +523,9 @@ protected static function parseUploadFiles(string $http_body, string $http_post_
522
523
break ;
523
524
}
524
525
}
526
+ if ($ post_encode_string ) {
527
+ \parse_str ($ post_encode_string , $ _POST );
528
+ }
525
529
}
526
530
}
527
531
You can’t perform that action at this time.
0 commit comments