Browse Source

Add "application/*+xml" to XML decoders

Closes gh-24164
pull/24185/head
Rossen Stoyanchev 6 years ago
parent
commit
f180bf7652
  1. 3
      spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java
  2. 3
      spring-web/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java

3
spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java

@ -52,6 +52,7 @@ import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferLimitException; import org.springframework.core.io.buffer.DataBufferLimitException;
import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.log.LogFormatUtils; import org.springframework.core.log.LogFormatUtils;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
@ -92,7 +93,7 @@ public class Jaxb2XmlDecoder extends AbstractDecoder<Object> {
public Jaxb2XmlDecoder() { public Jaxb2XmlDecoder() {
super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML); super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML, new MediaType("application", "*+xml"));
} }
/** /**

3
spring-web/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java

@ -42,6 +42,7 @@ import org.springframework.core.codec.AbstractDecoder;
import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferLimitException; import org.springframework.core.io.buffer.DataBufferLimitException;
import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.MimeType; import org.springframework.util.MimeType;
@ -94,7 +95,7 @@ public class XmlEventDecoder extends AbstractDecoder<XMLEvent> {
public XmlEventDecoder() { public XmlEventDecoder() {
super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML); super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML, new MediaType("application", "*+xml"));
} }

Loading…
Cancel
Save