Skip to content

Commit 49d29ff

Browse files
authored
Merge pull request #206 from t2gran/fix-mark-not-set
Fix #205 java.io.IOException: Mark not set
2 parents 03d05ab + 2321f1c commit 49d29ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/graphql/servlet/AbstractGraphQLHttpServlet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,12 @@ private boolean isBatchedQuery(InputStream inputStream) throws IOException {
454454
return false;
455455
}
456456

457+
final int BUFFER_SIZE = 128;
457458
ByteArrayOutputStream result = new ByteArrayOutputStream();
458-
byte[] buffer = new byte[128];
459+
byte[] buffer = new byte[BUFFER_SIZE];
459460
int length;
460461

461-
inputStream.mark(0);
462+
inputStream.mark(BUFFER_SIZE);
462463
while ((length = inputStream.read(buffer)) != -1) {
463464
result.write(buffer, 0, length);
464465
String chunk = result.toString();

0 commit comments

Comments
 (0)