RFR: 8145388: URLConnection.guessContentTypeFromStream returns image/jpg for some JPEG images
Ramanand Patil
ramanand.patil at oracle.com
Tue Dec 22 18:48:57 UTC 2015
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