Closed soult closed 4 years ago
there already was a function to cleanly extract content type here: https://github.com/Athlon1600/php-proxy/blob/master/src/helpers.php#L6
ProxifyPlugin was updated to use that function here: https://github.com/Athlon1600/php-proxy/commit/14e2a38e5b424d69fff82171e357d658ee158e11
The Content-Type header can contain additional information like encoding, separated by a semicolon. Since we only care about the media type, we can split at the first semicolon and ignore the rest.