src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java
branchhttp-client-branch
changeset 56126 86e628130926
parent 56104 3420c1bdd254
child 56167 96fa4f49a9ff
equal deleted inserted replaced
56122:1d7d3d8f8021 56126:86e628130926
   308                                                     Function<ExchangeImpl<T>,CompletableFuture<Response>> andThen) {
   308                                                     Function<ExchangeImpl<T>,CompletableFuture<Response>> andThen) {
   309         t = Utils.getCompletionCause(t);
   309         t = Utils.getCompletionCause(t);
   310         if (t instanceof ProxyAuthenticationRequired) {
   310         if (t instanceof ProxyAuthenticationRequired) {
   311             bodyIgnored = MinimalFuture.completedFuture(null);
   311             bodyIgnored = MinimalFuture.completedFuture(null);
   312             Response proxyResponse = ((ProxyAuthenticationRequired)t).proxyResponse;
   312             Response proxyResponse = ((ProxyAuthenticationRequired)t).proxyResponse;
       
   313             HttpConnection c = ex == null ? null : ex.connection();
   313             Response syntheticResponse = new Response(request, this,
   314             Response syntheticResponse = new Response(request, this,
   314                     proxyResponse.headers, proxyResponse.statusCode,
   315                     proxyResponse.headers, c, proxyResponse.statusCode,
   315                     proxyResponse.version, true);
   316                     proxyResponse.version, true);
   316             return MinimalFuture.completedFuture(syntheticResponse);
   317             return MinimalFuture.completedFuture(syntheticResponse);
   317         } else if (t != null) {
   318         } else if (t != null) {
   318             return MinimalFuture.failedFuture(t);
   319             return MinimalFuture.failedFuture(t);
   319         } else {
   320         } else {