Platform: PHP 8.0.3 (FPM) / NGINX 1.18.0 / linux
riverline/multipart-parser: 2.0.8
When using the PHP FPM behind NGINX (although this should be the case for any CGI based consumer) $_SERVER has both HTTP_CONTENT_TYPE and CONTENT_TYPE indexes set, as well as both HTTP_CONTENT_LENGTH and CONTENT_LENGTH indexes.
This means that when Riverline\MultiPartParser\Converters\Globals::convert() is called the stream sent to the StreamedPart constructor contains 2 content-type headers, and results in an array when StreamedPart parses it.
Unfortunately the parseHeaderContent() method calls explode() on the content without checking if it's an array and fails.
Platform: PHP 8.0.3 (FPM) / NGINX 1.18.0 / linux
riverline/multipart-parser: 2.0.8
When using the PHP FPM behind NGINX (although this should be the case for any CGI based consumer) $_SERVER has both HTTP_CONTENT_TYPE and CONTENT_TYPE indexes set, as well as both HTTP_CONTENT_LENGTH and CONTENT_LENGTH indexes.
This means that when
Riverline\MultiPartParser\Converters\Globals::convert()is called the stream sent to the StreamedPart constructor contains 2 content-type headers, and results in an array when StreamedPart parses it.Unfortunately the parseHeaderContent() method calls explode() on the content without checking if it's an array and fails.