Skip to content

Commit b059c10

Browse files
committed
Reinstate utf8
1 parent f5e67e9 commit b059c10

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/HttpRequestHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
public interface HttpRequestHandler {
88

9-
String APPLICATION_JSON_UTF8 = "application/json";
10-
String APPLICATION_EVENT_STREAM_UTF8 = "text/event-stream";
9+
String APPLICATION_JSON_UTF8 = "application/json;charset=UTF-8";
10+
String APPLICATION_EVENT_STREAM_UTF8 = "text/event-stream;charset=UTF-8";
1111

1212
int STATUS_OK = 200;
1313
int STATUS_BAD_REQUEST = 400;

graphql-java-servlet/src/test/groovy/graphql/kickstart/servlet/AbstractGraphQLHttpServletSpec.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class AbstractGraphQLHttpServletSpec extends Specification {
2626
public static final int STATUS_OK = 200
2727
public static final int STATUS_BAD_REQUEST = 400
2828
public static final int STATUS_ERROR = 500
29-
public static final String CONTENT_TYPE_JSON_UTF8 = 'application/json'
30-
public static final String CONTENT_TYPE_SERVER_SENT_EVENTS = 'text/event-stream'
29+
public static final String CONTENT_TYPE_JSON_UTF8 = 'application/json;charset=UTF-8'
30+
public static final String CONTENT_TYPE_SERVER_SENT_EVENTS = 'text/event-stream;charset=UTF-8'
3131

3232
@Shared
3333
ObjectMapper mapper = new ObjectMapper()

graphql-java-servlet/src/test/groovy/graphql/kickstart/servlet/cache/CacheReaderTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CacheReaderTest extends Specification {
6464

6565
then:
6666
result
67-
1 * response.setContentType("application/json")
67+
1 * response.setContentType("application/json;charset=UTF-8")
6868
1 * response.setStatus(200)
6969
1 * response.setCharacterEncoding("UTF-8")
7070
1 * response.setContentLength(3)

0 commit comments

Comments
 (0)