equal
deleted
inserted
replaced
205 responseSubscriber.onError(t); |
205 responseSubscriber.onError(t); |
206 close(); |
206 close(); |
207 } |
207 } |
208 } |
208 } |
209 |
209 |
210 // Callback invoked after the Response BodyProcessor has consumed the |
210 // Callback invoked after the Response BodySubscriber has consumed the |
211 // buffers contained in a DataFrame. |
211 // buffers contained in a DataFrame. |
212 // Returns true if END_STREAM is reached, false otherwise. |
212 // Returns true if END_STREAM is reached, false otherwise. |
213 private boolean consumed(DataFrame df) { |
213 private boolean consumed(DataFrame df) { |
214 // RFC 7540 6.1: |
214 // RFC 7540 6.1: |
215 // The entire DATA frame payload is included in flow control, |
215 // The entire DATA frame payload is included in flow control, |
1032 |
1032 |
1033 @Override |
1033 @Override |
1034 void completeResponse(Response r) { |
1034 void completeResponse(Response r) { |
1035 Log.logResponse(r::toString); |
1035 Log.logResponse(r::toString); |
1036 pushCF.complete(r); // not strictly required for push API |
1036 pushCF.complete(r); // not strictly required for push API |
1037 // start reading the body using the obtained BodyProcessor |
1037 // start reading the body using the obtained BodySubscriber |
1038 CompletableFuture<Void> start = new MinimalFuture<>(); |
1038 CompletableFuture<Void> start = new MinimalFuture<>(); |
1039 start.thenCompose( v -> readBodyAsync(getPushHandler(), false, getExchange().executor())) |
1039 start.thenCompose( v -> readBodyAsync(getPushHandler(), false, getExchange().executor())) |
1040 .whenComplete((T body, Throwable t) -> { |
1040 .whenComplete((T body, Throwable t) -> { |
1041 if (t != null) { |
1041 if (t != null) { |
1042 responseCF.completeExceptionally(t); |
1042 responseCF.completeExceptionally(t); |