src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java
equal
deleted
inserted
replaced
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 } |