Browse Source

Merge branch '5.1.x'

pull/22938/head
Sam Brannen 6 years ago
parent
commit
8e29eca1eb
  1. 3
      spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java

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

@ -50,6 +50,7 @@ import org.springframework.util.Assert;
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Brian Clozel * @author Brian Clozel
* @author Sam Brannen
* @since 5.0 * @since 5.0
* @param <T> the type of objects in the input stream * @param <T> the type of objects in the input stream
*/ */
@ -171,7 +172,7 @@ public class EncoderHttpMessageWriter<T> implements HttpMessageWriter<T> {
} }
for (MediaType mediaType : ((HttpMessageEncoder<?>) this.encoder).getStreamingMediaTypes()) { for (MediaType mediaType : ((HttpMessageEncoder<?>) this.encoder).getStreamingMediaTypes()) {
if (contentType.isCompatibleWith(mediaType) && if (contentType.isCompatibleWith(mediaType) &&
contentType.getParameters().entrySet().containsAll(mediaType.getParameters().keySet())) { contentType.getParameters().keySet().containsAll(mediaType.getParameters().keySet())) {
return true; return true;
} }
} }

Loading…
Cancel
Save