ServerHttpResponse allows commitActions to be added (e.g. inside a WebFilter) via the beforeCommit method.
AbstractHttpServerResponse however calls the protected methods applyStatusCode(), applyHeaders() and applyCookies() synchronously before the Mono<Void>s passed as commitActions get executed. This makes it impossible to change the status code, add headers or cookies in beforeCommit actions asynchonously. A use case for this would be to add values from the subscriber context to the response headers.
AbstractHttpServerResponse#doCommit should wrap the calls to the applyXXX() methods in a mono which is subscribed to after the other commitActions.