10ab1a9789
SWEBenchMultimodalProblemStatement._download_and_convert_image compared the full lowercased Content-Type header against VALID_IMAGE_MIME_TYPES. When a server returns a valid image with media type parameters (for example "Content-Type: image/png; charset=utf-8", which is legal per RFC 9110), the string "image/png; charset=utf-8" is not in the allowed set, so the image is logged as an unsupported MIME type and silently dropped from the problem statement. Strip the media type parameters (split on ";", strip, lowercase) before the existing image/jpg -> image/jpeg normalization and the membership check, so the bare media type is validated and used in the encoded data URI. Behavior for unsupported types, size limits, empty images, and network failures is unchanged. Add a regression test covering a Content-Type header with a charset parameter. Closes #1441 Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>