src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java
branchhttp-client-branch
changeset 55815 4f699653026b
parent 55799 c71f52f48d97
child 55973 4d9b002587db
equal deleted inserted replaced
55814:cb1e2086ca36 55815:4f699653026b
    74                             if (resp.statusCode() != 200) {
    74                             if (resp.statusCode() != 200) {
    75                                 cf.completeExceptionally(new IOException(
    75                                 cf.completeExceptionally(new IOException(
    76                                         "Tunnel failed, got: "+ resp.statusCode()));
    76                                         "Tunnel failed, got: "+ resp.statusCode()));
    77                             } else {
    77                             } else {
    78                                 // get the initial/remaining bytes
    78                                 // get the initial/remaining bytes
    79                                 ByteBuffer b = ((Http1Exchange<?>)connectExchange.exchImpl).getBuffer();
    79                                 ByteBuffer b = ((Http1Exchange<?>)connectExchange.exchImpl).drainLeftOverBytes();
    80                                 int remaining = b.remaining();
    80                                 int remaining = b.remaining();
    81                                 assert remaining == 0: "Unexpected remaining: " + remaining;
    81                                 assert remaining == 0: "Unexpected remaining: " + remaining;
    82                                 connected = true;
    82                                 connected = true;
    83                                 cf.complete(null);
    83                                 cf.complete(null);
    84                             }
    84                             }