]
Heiko Braun reassigned WFLY-4952:
---------------------------------
Assignee: Heiko Braun (was: Brian Stansberry)
Provide a way to correlate HTTP management requests
---------------------------------------------------
Key: WFLY-4952
URL:
https://issues.jboss.org/browse/WFLY-4952
Project: WildFly
Issue Type: Enhancement
Components: Domain Management
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: 10.0.0.Beta1
public class CorrelationHandler implements HttpHandler {
private static final HttpString HEADER = new HttpString("X-CORR-ID");
private final HttpHandler next;
public CorrelationHandler(HttpHandler next) {
this.next = next;
}
@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
String corr = exchange.getRequestHeaders().getFirst(HEADER);
if(corr != null) {
exchange.getResponseHeaders().put(HEADER, corr);
}
next.handleRequest(exchange);
}
}