Skip to content

Commit 2321f1c

Browse files
committed
Fix #205 java.io.IOException: Mark not set
1 parent 8ea7d83 commit 2321f1c

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
@@ -457,11 +457,12 @@ private boolean isBatchedQuery(InputStream inputStream) throws IOException {
457457
return false;
458458
}
459459

460+
final int BUFFER_SIZE = 128;
460461
ByteArrayOutputStream result = new ByteArrayOutputStream();
461-
byte[] buffer = new byte[128];
462+
byte[] buffer = new byte[BUFFER_SIZE];
462463
int length;
463464

464-
inputStream.mark(0);
465+
inputStream.mark(BUFFER_SIZE);
465466
while ((length = inputStream.read(buffer)) != -1) {
466467
result.write(buffer, 0, length);
467468
String chunk = result.toString();

0 commit comments

Comments
 (0)