RFR: 8145388: URLConnection.guessContentTypeFromStream returns image/jpg for some JPEG images

Phil Race philip.race at oracle.com
Wed Dec 23 19:36:42 UTC 2015


Looks OK to me. I don't know why the difference but it goes back to JDK 1.1

-phil.

On 12/22/2015 10:48 AM, Ramanand Patil wrote:
> HI all,
>
>   
>
> Please review this small fix for Bug  - https://bugs.openjdk.java.net/browse/JDK-8145388
>
>   
>
> Bug Description - For some JPEG images the method java.net.URLConnection#guessContentTypeFromStream will return the MIME type image/jpg, which is not a valid, registered IANA mime type for JPEG images.
>
>   
>
> Webrev - http://cr.openjdk.java.net/~ntv/ramanand/8145388/webrev.00/
>
>   
>
> Fix - Since "image/jpg" is not a valid Content Type, the method should return "image/jpeg" when APPn marker segment has 'EE' as a marker type.
>
>   
>
>   
>
> Regards,
>
> Ramanand.
>
>   




More information about the core-libs-dev mailing list