diff --git a/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java b/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java index b163058fee5603..43dba98ef7548b 100644 --- a/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java +++ b/extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java @@ -267,10 +267,10 @@ private static String parseCharset(String mimeType) { if (charsetLen == 0) { return null; } - return charsetOf(mimeType, charsetValueStart, charsetValueEnd, charsetLen); + return charsetOf(mimeType, charsetValueStart, charsetLen); } - private static String charsetOf(String mimeType, int charsetValueStart, int charsetValueEnd, int charsetLen) { + private static String charsetOf(String mimeType, int charsetValueStart, int charsetLen) { switch (charsetLen) { case 5: if (mimeType.regionMatches(charsetValueStart, "utf-8", 0, 5)) { @@ -283,7 +283,7 @@ private static String charsetOf(String mimeType, int charsetValueStart, int char } break; } - return mimeType.substring(charsetValueStart, charsetValueEnd); + return mimeType.substring(charsetValueStart, charsetValueStart + charsetLen); } private static String getCharset(String mimeType) {