Remove charset from content-type in SseEmitter

See gh-24632
This commit is contained in:
sada-sigsci
2020-03-02 17:35:00 -08:00
committed by Rossen Stoyanchev
parent b2fe494b9c
commit cc1f57823b
2 changed files with 4 additions and 7 deletions

View File

@@ -41,9 +41,6 @@ public class SseEmitter extends ResponseBodyEmitter {
static final MediaType TEXT_PLAIN = new MediaType("text", "plain", StandardCharsets.UTF_8);
static final MediaType TEXT_EVENTSTREAM = new MediaType("text", "event-stream", StandardCharsets.UTF_8);
/**
* Create a new SseEmitter instance.
*/
@@ -70,7 +67,7 @@ public class SseEmitter extends ResponseBodyEmitter {
HttpHeaders headers = outputMessage.getHeaders();
if (headers.getContentType() == null) {
headers.setContentType(TEXT_EVENTSTREAM);
headers.setContentType(MediaType.TEXT_EVENT_STREAM);
}
}