In T252909, a call to $mimeAnalyzer->getExtensionsForType( $contentType ) caused issues when given a Content-Type header. While these headers are often identical to a valid mime type, they can also contain additional segments such as ; charset=utf-8 etc.
The logic for stripping or extracting that should not be spread around different code bases in the form of an ad-hoc regex but rather be centralised in some way.
Perhaps a method on MimeAnalyser makes sense for this, either by magically stripping it from getExtensionsForType parameters, or by a variant of that method more explicitly for HTTP purposes, e.g. getExtensionsFromHttpContentType or some such.
Another way would be to split these concerns and e.g. add a method somewhere in the the wikimedia/http component instead, and require consumers to call both methods, e.g. MimeAnalyser->getExtensionsForType( Wikimedia\Http::getMimeFromContentType( … ) ); or some such.