The class io.undertow.server.handlers.form.EagerFormParsingHandler could be used as a HttpHandler to parse the POST data into a FormData object.
The implementation is not compatible with the dispatch mechanism to move the work from the IO threads to worker threads. The form parser will call Connectors#executeRootHandler to delegate to the registered next handler as soon as POST data was successfully parsed into the FormData object.
The call to Connectors#executeRootHandler will start a new independent handler chain for the next handler. This handler will dispatch its work and exits its execution on the IO thread. You now have two handler chains which will exit its execution. One will find the dispatched task, while the other one won't get any information about it and completes with a call to HttpServerExchange#endExchange. As soon as the dispatched task will be executed, you are unable to modify headers, etc as endExchange on HttpServerExchange was already called.