Skip to content

Commit e6565ee

Browse files
and another one
1 parent 45dfcb3 commit e6565ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/fixtures/gcs-fixture/src/main/java/fixture/gcs/FakeOAuth2HttpHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public class FakeOAuth2HttpHandler implements HttpHandler {
3535
@Override
3636
public void handle(final HttpExchange exchange) throws IOException {
3737
try {
38+
while (exchange.getRequestBody().read(BUFFER) >= 0) ;
3839
byte[] response = ("{\"access_token\":\"foo\",\"token_type\":\"Bearer\",\"expires_in\":3600}").getBytes(UTF_8);
3940
exchange.getResponseHeaders().add("Content-Type", "application/json");
4041
exchange.sendResponseHeaders(RestStatus.OK.getStatus(), response.length);
4142
exchange.getResponseBody().write(response);
42-
while (exchange.getRequestBody().read(BUFFER) >= 0) ;
4343
} finally {
4444
int read = exchange.getRequestBody().read();
4545
assert read == -1 : "Request body should have been fully read here but saw [" + read + "]";

0 commit comments

Comments
 (0)