Skip to content

Commit 3908770

Browse files
committed
use ContentType as application/json-rpc
1 parent 90eabc6 commit 3908770

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

framework/src/main/java/org/tron/core/services/jsonrpc/JsonRpcServlet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private void handleBatch(HttpServletResponse resp, JsonNode rootNode, int maxRes
220220
}
221221

222222
byte[] finalBytes = MAPPER.writeValueAsBytes(batchResult);
223-
resp.setContentType("application/json; charset=utf-8");
223+
resp.setContentType("application/json-rpc; charset=utf-8");
224224
resp.setStatus(HttpServletResponse.SC_OK);
225225
resp.setContentLength(finalBytes.length);
226226
resp.getOutputStream().write(finalBytes);
@@ -262,7 +262,7 @@ private void writeJsonRpcError(HttpServletResponse resp, JsonRpcError error, Str
262262
} else {
263263
bytes = MAPPER.writeValueAsBytes(errorObj);
264264
}
265-
resp.setContentType("application/json; charset=utf-8");
265+
resp.setContentType("application/json-rpc; charset=utf-8");
266266
resp.setStatus(HttpServletResponse.SC_OK);
267267
resp.setContentLength(bytes.length);
268268
resp.getOutputStream().write(bytes);

0 commit comments

Comments
 (0)