--- a/src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java Wed Jun 13 15:45:27 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java Wed Jun 13 19:11:47 2018 +0100
@@ -165,6 +165,7 @@
+ asyncReceiver.remaining() +") " + readProgress);
if (firstTimeAround) {
+ if (debug.on()) debug.log("First time around");
firstTimeAround = false;
} else {
// with expect continue we will resume reading headers + body.
@@ -180,6 +181,12 @@
CompletableFuture<State> cf = headersReader.completion();
assert cf != null : "parsing not started";
+ if (debug.on()) {
+ debug.log("headersReader is %s",
+ cf == null ? "not yet started"
+ : cf.isDone() ? "already completed"
+ : "not yet completed");
+ }
Function<State, Response> lambda = (State completed) -> {
assert completed == State.READING_HEADERS;