Code review comment: Is this always the first handler invoked? Curious if the response headers could be overwritten if they were set previously

Code under review:
public void handle(RestClientRequestContext requestContext) {
        if (requestContext.isAborted()) {
            return;
        }
        requestContext.suspend();
        Uni<HttpClientRequest> future = createRequest(requestContext)
                .runSubscriptionOn(new Executor() {
                    @Override
                    public void execute(Runnable command) {
                        Context current = Vertx.currentContext();
                        ClientRequestContextImpl clientRequestContext = requestContext.getClientRequestContext();
                        Context captured = null;
                        if (clientRequestContext != null) {
                            captured = clientRequestContext.getContext();
                        }
                        if (current == captured || captured == null) {
                            
                            command.run();
                        } else {
                            
                            captured.runOnContext(new Handler<Void>() {
                                @Override
                                public void handle(Void ignored) {
                                    command.run();
                                }
                            });
                        }
                    }
                });

        
        future.subscribe().with(new Consumer<>() {
            @Override
            public void accept(HttpClientRequest httpClientRequest) {
                Future<HttpClientResponse> sent;
                if (requestContext.isMultipart()) {
                    Promise<HttpClientRequest> requestPromise = Promise.promise();
                    QuarkusMultipartFormUpload actualEntity;
                    try {
                        actualEntity = ClientSendRequestHandler.this.setMultipartHeadersAndPrepareBody(httpClientRequest,
                                requestContext);
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, null, true);
                        }

                        Pipe<Buffer> pipe = actualEntity.pipe(); 
                        requestPromise.future().onComplete(ar -> {

                            if (ar.succeeded()) {
                                HttpClientRequest req = ar.result();
                                if (httpClientRequest.headers() == null
                                        || !httpClientRequest.headers().contains(HttpHeaders.CONTENT_LENGTH)) {
                                    req.setChunked(true);
                                }
                                pipe.endOnFailure(false);
                                pipe.to(req, ar2 -> {
                                    if (ar2.failed()) {
                                        req.reset(0L, ar2.cause());
                                    }
                                });
                                actualEntity.run();
                            } else {
                                pipe.close();
                            }
                        });
                        sent = httpClientRequest.response();
                        requestPromise.complete(httpClientRequest);
                    } catch (Throwable e) {
                        reportFinish(e, requestContext);
                        requestContext.resume(e);
                        return;
                    }
                } else {
                    Buffer actualEntity;
                    try {
                        actualEntity = ClientSendRequestHandler.this
                                .setRequestHeadersAndPrepareBody(httpClientRequest, requestContext);
                    } catch (Throwable e) {
                        requestContext.resume(e);
                        return;
                    }
                    if (actualEntity == AsyncInvokerImpl.EMPTY_BUFFER) {
                        sent = httpClientRequest.send();
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, null, false);
                        }
                    } else {
                        sent = httpClientRequest.send(actualEntity);
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, actualEntity, false);
                        }
                    }
                }

                sent.onSuccess(new Handler<>() {
                    @Override
                    public void handle(HttpClientResponse clientResponse) {
                        try {
                            requestContext.initialiseResponse(clientResponse);
                            int status = clientResponse.statusCode();
                            if (requestContext.getCallStatsCollector() != null) {
                                if (status >= 500 && status < 600) {
                                    reportFinish(new InternalServerErrorException(),
                                            requestContext);
                                } else {
                                    reportFinish(null, requestContext);
                                }
                            }

                            if (isResponseMultipart(requestContext)) {
                                QuarkusMultipartResponseDecoder multipartDecoder = new QuarkusMultipartResponseDecoder(
                                        clientResponse);

                                clientResponse.handler(multipartDecoder::offer);

                                clientResponse.endHandler(new Handler<>() {
                                    @Override
                                    public void handle(Void event) {
                                        multipartDecoder.offer(LastHttpContent.EMPTY_LAST_CONTENT);

                                        List<InterfaceHttpData> datas = multipartDecoder.getBodyHttpDatas();
                                        requestContext.setResponseMultipartParts(datas);

                                        if (loggingScope != LoggingScope.NONE) {
                                            clientLogger.logResponse(clientResponse, false);
                                        }

                                        requestContext.resume();
                                    }
                                });
                            } else if (!requestContext.isRegisterBodyHandler()) {
                                clientResponse.pause();
                                if (loggingScope != LoggingScope.NONE) {
                                    clientLogger.logResponse(clientResponse, false);
                                }
                                requestContext.resume();
                            } else {
                                clientResponse.bodyHandler(new Handler<>() {
                                    @Override
                                    public void handle(Buffer buffer) {
                                        if (loggingScope != LoggingScope.NONE) {
                                            clientLogger.logResponse(clientResponse, false);
                                        }
                                        try {
                                            if (buffer.length() > 0) {
                                                requestContext.setResponseEntityStream(
                                                        new ByteArrayInputStream(buffer.getBytes()));
                                            } else {
                                                requestContext.setResponseEntityStream(null);
                                            }
                                            requestContext.resume();
                                        } catch (Throwable t) {
                                            requestContext.resume(t);
                                        }
                                    }
                                });
                            }
                        } catch (Throwable t) {
                            reportFinish(t, requestContext);
                            requestContext.resume(t);
                        }
                    }
                })
                        .onFailure(new Handler<>() {
                            @Override
                            public void handle(Throwable failure) {
                                if (failure instanceof IOException) {
                                    requestContext.resume(new ProcessingException(failure));
                                } else {
                                    requestContext.resume(failure);
                                }
                            }
                        });
            }
        }, new Consumer<>() {
            @Override
            public void accept(Throwable event) {
                
                requestContext.setResponseHeaders(new MultivaluedTreeMap<>());
                requestContext.setResponseReasonPhrase("unknown");

                if (event instanceof IOException) {
                    ProcessingException throwable = new ProcessingException(event);
                    reportFinish(throwable, requestContext);
                    requestContext.resume(throwable);
                } else {
                    requestContext.resume(event);
                    reportFinish(event, requestContext);
                }
            }
        });
    }

Line commented on: requestContext.setResponseHeaders(new MultivaluedTreeMap<>());

Revised code:
public void handle(RestClientRequestContext requestContext) {
        if (requestContext.isAborted()) {
            return;
        }
        requestContext.suspend();
        Uni<HttpClientRequest> future = createRequest(requestContext)
                .runSubscriptionOn(new Executor() {
                    @Override
                    public void execute(Runnable command) {
                        Context current = Vertx.currentContext();
                        ClientRequestContextImpl clientRequestContext = requestContext.getClientRequestContext();
                        Context captured = null;
                        if (clientRequestContext != null) {
                            captured = clientRequestContext.getContext();
                        }
                        if (current == captured || captured == null) {
                            
                            command.run();
                        } else {
                            
                            captured.runOnContext(new Handler<Void>() {
                                @Override
                                public void handle(Void ignored) {
                                    command.run();
                                }
                            });
                        }
                    }
                });

        
        future.subscribe().with(new Consumer<>() {
            @Override
            public void accept(HttpClientRequest httpClientRequest) {
                Future<HttpClientResponse> sent;
                if (requestContext.isMultipart()) {
                    Promise<HttpClientRequest> requestPromise = Promise.promise();
                    QuarkusMultipartFormUpload actualEntity;
                    try {
                        actualEntity = ClientSendRequestHandler.this.setMultipartHeadersAndPrepareBody(httpClientRequest,
                                requestContext);
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, null, true);
                        }

                        Pipe<Buffer> pipe = actualEntity.pipe(); 
                        requestPromise.future().onComplete(ar -> {

                            if (ar.succeeded()) {
                                HttpClientRequest req = ar.result();
                                if (httpClientRequest.headers() == null
                                        || !httpClientRequest.headers().contains(HttpHeaders.CONTENT_LENGTH)) {
                                    req.setChunked(true);
                                }
                                pipe.endOnFailure(false);
                                pipe.to(req, ar2 -> {
                                    if (ar2.failed()) {
                                        req.reset(0L, ar2.cause());
                                    }
                                });
                                actualEntity.run();
                            } else {
                                pipe.close();
                            }
                        });
                        sent = httpClientRequest.response();
                        requestPromise.complete(httpClientRequest);
                    } catch (Throwable e) {
                        reportFinish(e, requestContext);
                        requestContext.resume(e);
                        return;
                    }
                } else {
                    Buffer actualEntity;
                    try {
                        actualEntity = ClientSendRequestHandler.this
                                .setRequestHeadersAndPrepareBody(httpClientRequest, requestContext);
                    } catch (Throwable e) {
                        requestContext.resume(e);
                        return;
                    }
                    if (actualEntity == AsyncInvokerImpl.EMPTY_BUFFER) {
                        sent = httpClientRequest.send();
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, null, false);
                        }
                    } else {
                        sent = httpClientRequest.send(actualEntity);
                        if (loggingScope != LoggingScope.NONE) {
                            clientLogger.logRequest(httpClientRequest, actualEntity, false);
                        }
                    }
                }

                sent.onSuccess(new Handler<>() {
                    @Override
                    public void handle(HttpClientResponse clientResponse) {
                        try {
                            requestContext.initialiseResponse(clientResponse);
                            int status = clientResponse.statusCode();
                            if (requestContext.getCallStatsCollector() != null) {
                                if (status >= 500 && status < 600) {
                                    reportFinish(new InternalServerErrorException(),
                                            requestContext);
                                } else {
                                    reportFinish(null, requestContext);
                                }
                            }

                            if (isResponseMultipart(requestContext)) {
                                QuarkusMultipartResponseDecoder multipartDecoder = new QuarkusMultipartResponseDecoder(
                                        clientResponse);

                                clientResponse.handler(multipartDecoder::offer);

                                clientResponse.endHandler(new Handler<>() {
                                    @Override
                                    public void handle(Void event) {
                                        multipartDecoder.offer(LastHttpContent.EMPTY_LAST_CONTENT);

                                        List<InterfaceHttpData> datas = multipartDecoder.getBodyHttpDatas();
                                        requestContext.setResponseMultipartParts(datas);

                                        if (loggingScope != LoggingScope.NONE) {
                                            clientLogger.logResponse(clientResponse, false);
                                        }

                                        requestContext.resume();
                                    }
                                });
                            } else if (!requestContext.isRegisterBodyHandler()) {
                                clientResponse.pause();
                                if (loggingScope != LoggingScope.NONE) {
                                    clientLogger.logResponse(clientResponse, false);
                                }
                                requestContext.resume();
                            } else {
                                clientResponse.bodyHandler(new Handler<>() {
                                    @Override
                                    public void handle(Buffer buffer) {
                                        if (loggingScope != LoggingScope.NONE) {
                                            clientLogger.logResponse(clientResponse, false);
                                        }
                                        try {
                                            if (buffer.length() > 0) {
                                                requestContext.setResponseEntityStream(
                                                        new ByteArrayInputStream(buffer.getBytes()));
                                            } else {
                                                requestContext.setResponseEntityStream(null);
                                            }
                                            requestContext.resume();
                                        } catch (Throwable t) {
                                            requestContext.resume(t);
                                        }
                                    }
                                });
                            }
                        } catch (Throwable t) {
                            reportFinish(t, requestContext);
                            requestContext.resume(t);
                        }
                    }
                })
                        .onFailure(new Handler<>() {
                            @Override
                            public void handle(Throwable failure) {
                                if (failure instanceof IOException) {
                                    requestContext.resume(new ProcessingException(failure));
                                } else {
                                    requestContext.resume(failure);
                                }
                            }
                        });
            }
        }, new Consumer<>() {
            @Override
            public void accept(Throwable event) {
                
                requestContext.setResponseHeaders(new MultivaluedTreeMap<>());
                requestContext.setResponseReasonPhrase("unknown");

                if (event instanceof IOException) {
                    ProcessingException throwable = new ProcessingException(event);
                    reportFinish(throwable, requestContext);
                    requestContext.resume(throwable);
                } else {
                    requestContext.resume(event);
                    reportFinish(event, requestContext);
                }
            }
        });
    }