Incorrect MIME type for image SPI

Icon image reader/writer SPI classes registers MIME types incorrectly. They seem to register MIME types for icons as:


{ “image/vnd.microsoft.icon, image/x-icon” }

This might work for ImageIO, but other libraries, like Spring, does not accept MIME types registered in this way. The correct way would be to separate the two types, so that they are registered as two separate MIME types. The correct format would be:

{ “image/vnd.microsoft.icon”, “image/x-icon” }

This problem prevents us from integrating the library into our solution.

Hi Stig Runar,

Thanks for your interest in Aspose.Slides.

I have tried to understand the query shared by you. Can you pleas share that what issue you are having while using Aspose.Slides along with some snapshots highlighting the issue/requirement, sample code and source presentation. Based on shared information, I will try my best to help you further.

Many Thanks,

I am trying to use Aspose.Slides in the same context as Spring MVC. I am using Spring version 3.2.3 and Slides version 7.5.1. For the Spring handler adapter I have a message converter called BufferedImageHttpMessageConverter. This converter does not like the incorrectly defined MIME type from Slides, and gives the following error:


Caused by: org.springframework.http.InvalidMediaTypeException: Invalid media type “image/vnd.microsoft.icon, image/x-icon”: Invalid token character ‘,’ in token “vnd.microsoft.icon, image/x-icon”
at org.springframework.http.MediaType.parseMediaType(MediaType.java:730)
at org.springframework.http.converter.BufferedImageHttpMessageConverter.(BufferedImageHttpMessageConverter.java:75)

Hi Stig Runar,

I have observed that you are using Spring MVC framework. I doubt whether Aspose.Slides is supported with the specified framework. Please share the sample project along with Spring MVC based project and operating system details with us. I will investigate the issue further on my end based on availability of requested information to help you further.

Many Thanks,

Slides seems to support Spring MVC perfectly as long as I disable one of the message converters. Had only Slides registered its MIME types correctly, I could have used any message converter.

Hi Stig Runar,

I have observed your comments that Aspose.Slides seems to support Spring MVC as long as you disable one of the message converters. Please also share that what issue you are
having while using Aspose.Slides along with some snapshots highlighting
the issue/requirement, sample code and source presentation. Please share the details of message in this regard so that I may add an investigation ticket for your convenience. Please also try our latest version Aspose.Slides for Java 7.6.0 as well on your end. Also, by looking at stack trace in above post, I have not observed Aspose.Slides in the stack trace.

Many Thanks,