Skip to content

Commit 5c57364

Browse files
vishalyaChaho12
andauthored
Update gateway-ha/src/main/java/io/trino/gateway/ha/router/TrinoQueryProperties.java
Co-authored-by: Jaeho Yoo <[email protected]>
1 parent 23c9b0e commit 5c57364

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/router/TrinoQueryProperties.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,10 @@ else if (statement instanceof ExecuteImmediate executeImmediate) {
243243

244244
private void processRequestBody(ContainerRequestContext requestContext)
245245
{
246-
InputStream entityStream = requestContext.getEntityStream();
247-
if (entityStream == null ||
248-
!requestContext.hasEntity() || requestContext.getMediaType() == null ||
249-
!requestContext.getMediaType().getParameters().containsKey("charset") ||
250-
!StandardCharsets.UTF_8.name().equalsIgnoreCase(requestContext.getMediaType().getParameters().get("charset"))) {
246+
if (!shouldProcessBody(requestContext)) {
247+
return;
248+
}
249+
251250
return;
252251
}
253252
InputStreamReader entityReader = new InputStreamReader(entityStream, StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)