src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
branchhttp-client-branch
changeset 56138 4f92b988600e
parent 56092 fd85b2bf2b0d
child 56210 efa5db108669
equal deleted inserted replaced
56137:dd867826d55b 56138:4f92b988600e
    40 import java.net.http.HttpClient;
    40 import java.net.http.HttpClient;
    41 import java.net.http.HttpRequest;
    41 import java.net.http.HttpRequest;
    42 import java.net.http.HttpResponse;
    42 import java.net.http.HttpResponse;
    43 import java.net.http.HttpResponse.PushPromiseHandler;
    43 import java.net.http.HttpResponse.PushPromiseHandler;
    44 import java.net.http.HttpTimeoutException;
    44 import java.net.http.HttpTimeoutException;
    45 import jdk.internal.net.http.UntrustedBodyHandler;
       
    46 import jdk.internal.net.http.common.Log;
    45 import jdk.internal.net.http.common.Log;
    47 import jdk.internal.net.http.common.MinimalFuture;
    46 import jdk.internal.net.http.common.MinimalFuture;
    48 import jdk.internal.net.http.common.ConnectionExpiredException;
    47 import jdk.internal.net.http.common.ConnectionExpiredException;
    49 import jdk.internal.net.http.common.Utils;
    48 import jdk.internal.net.http.common.Utils;
    50 import static jdk.internal.net.http.common.MinimalFuture.completedFuture;
    49 import static jdk.internal.net.http.common.MinimalFuture.completedFuture;
   117         this.client = client;
   116         this.client = client;
   118         this.filters = client.filterChain();
   117         this.filters = client.filterChain();
   119         this.acc = acc;
   118         this.acc = acc;
   120         this.executor = client.theExecutor();
   119         this.executor = client.theExecutor();
   121         this.responseHandler = responseHandler;
   120         this.responseHandler = responseHandler;
   122         if (acc != null) {
       
   123             // Restricts the file publisher with the senders ACC, if any
       
   124             if (responseHandler instanceof UntrustedBodyHandler)
       
   125                 ((UntrustedBodyHandler)this.responseHandler).setAccessControlContext(acc);
       
   126         }
       
   127 
   121 
   128         if (pushPromiseHandler != null) {
   122         if (pushPromiseHandler != null) {
   129             this.pushGroup = new PushGroup<>(pushPromiseHandler, request, acc);
   123             this.pushGroup = new PushGroup<>(pushPromiseHandler, request, acc);
   130         } else {
   124         } else {
   131             pushGroup = null;
   125             pushGroup = null;