Introduce mime/media types for application/rss+xml
Issue: SPR-15109
This commit is contained in:
@@ -433,7 +433,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
Properties props = new Properties();
|
||||
if (romePresent) {
|
||||
props.put("atom", MediaType.APPLICATION_ATOM_XML_VALUE);
|
||||
props.put("rss", "application/rss+xml");
|
||||
props.put("rss", MediaType.APPLICATION_RSS_XML_VALUE);
|
||||
}
|
||||
if (jaxb2Present || jackson2XmlPresent) {
|
||||
props.put("xml", MediaType.APPLICATION_XML_VALUE);
|
||||
|
||||
@@ -385,7 +385,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
Map<String, MediaType> map = new HashMap<>(4);
|
||||
if (romePresent) {
|
||||
map.put("atom", MediaType.APPLICATION_ATOM_XML);
|
||||
map.put("rss", MediaType.valueOf("application/rss+xml"));
|
||||
map.put("rss", MediaType.APPLICATION_RSS_XML);
|
||||
}
|
||||
if (jaxb2Present || jackson2XmlPresent) {
|
||||
map.put("xml", MediaType.APPLICATION_XML);
|
||||
|
||||
@@ -24,6 +24,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import com.rometools.rome.feed.rss.Channel;
|
||||
import com.rometools.rome.feed.rss.Item;
|
||||
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
|
||||
/**
|
||||
* Abstract superclass for RSS Feed views, using the
|
||||
* <a href="https://github.com/rometools/rome">ROME</a> package.
|
||||
@@ -46,7 +48,7 @@ import com.rometools.rome.feed.rss.Item;
|
||||
public abstract class AbstractRssFeedView extends AbstractFeedView<Channel> {
|
||||
|
||||
public AbstractRssFeedView() {
|
||||
setContentType("application/rss+xml");
|
||||
setContentType(MimeTypeUtils.APPLICATION_RSS_XML_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user