Buggy code:
public class ManagementHttpServer { private final HttpOpenListener openListener ; private final InetSocketAddress httpAddress ; private final InetSocketAddress secureAddress ; private volatile XnioWorker worker ; private volatile AcceptingChannel < StreamConnection > normalServer ; private volatile AcceptingChannel < SslConnection > secureServer ; private final SecurityRealm securityRealm ; private ManagementHttpServer ( HttpOpenListener openListener , InetSocketAddress httpAddress , InetSocketAddress secureAddress , SecurityRealm securityRealm ) { } public void start ( ) { } public void stop ( ) { } public static ManagementHttpServer create ( InetSocketAddress bindAddress , InetSocketAddress secureBindAddress , int backlog , ModelControllerClient modelControllerClient , ExecutorService executorService , SecurityRealm securityRealm , ControlledProcessStateService controlledProcessStateService , ConsoleMode consoleMode , String consoleSlot ) throws IOException { } private static void setupOpenListener ( HttpOpenListener listener , ModelControllerClient modelControllerClient , ConsoleMode consoleMode , String consoleSlot , ControlledProcessStateService controlledProcessStateService , int securePort , SecurityRealm securityRealm ) { CanonicalPathHandler canonicalPathHandler = new CanonicalPathHandler ( ) ; listener . setRootHandler ( canonicalPathHandler ) ; PathHandler pathHandler = new PathHandler ( ) ; HttpHandler current = pathHandler ; if ( securePort > 0 ) { current = new io . undertow . security . handlers . SinglePortConfidentialityHandler ( current , securePort ) ; } current = new io . undertow . server . handlers . cache . CacheHandler ( new io . undertow . server . handlers . cache . DirectBufferCache ( 1024 , ( 1024 * 10 ) , ( 1024 * 1000 ) , BufferAllocator . BYTE_BUFFER_ALLOCATOR ) , current ) ; current = new io . undertow . server . handlers . error . SimpleErrorPageHandler ( current ) ; canonicalPathHandler . setNext ( current ) ; ResourceHandlerDefinition consoleHandler = null ; try { consoleHandler = consoleMode . createConsoleHandler ( consoleSlot ) ; } catch ( ModuleLoadException e ) { HttpServerLogger . ROOT_LOGGER . consoleModuleNotFound ( ( consoleSlot == null ? "main" : consoleSlot ) ) ; } try { pathHandler . addPath ( ERROR_CONTEXT , ErrorContextHandler . createErrorContext ( consoleSlot ) ) ; } catch ( ModuleLoadException e ) { HttpServerLogger . ROOT_LOGGER . error ( ( consoleSlot == null ? "main" : consoleSlot ) ) ; } ManagementRootConsoleRedirectHandler rootConsoleRedirectHandler = new ManagementRootConsoleRedirectHandler ( consoleHandler ) ; DomainApiCheckHandler domainApiHandler = new DomainApiCheckHandler ( modelControllerClient , controlledProcessStateService ) ; <START_BUG> pathHandler . setDefaultHandler ( rootConsoleRedirectHandler ) ; <END_BUG> if ( consoleHandler != null ) { HttpHandler readinessHandler = new org . jboss . as . domain . http . server . security . RedirectReadinessHandler ( securityRealm , consoleHandler . getHandler ( ) , ErrorContextHandler . ERROR_CONTEXT ) ; pathHandler . addPath ( consoleHandler . getContext ( ) , readinessHandler ) ; } HttpHandler readinessHandler = new org . jboss . as . domain . http . server . security . DmrFailureReadinessHandler ( securityRealm , ManagementHttpServer . secureDomainAccess ( domainApiHandler , securityRealm ) , ErrorContextHandler . ERROR_CONTEXT ) ; pathHandler . addPath ( PATH , readinessHandler ) ; if ( securityRealm != null ) { pathHandler . addPath ( LogoutHandler . PATH , new org . jboss . as . domain . http . server . security . LogoutHandler ( securityRealm . getName ( ) ) ) ; } } private static HttpHandler secureDomainAccess ( final HttpHandler domainHandler , final SecurityRealm securityRealm ) { } private static AuthenticationMechanism wrap ( final AuthenticationMechanism toWrap , final AuthMechanism mechanism ) { } }

Fix:
pathHandler . addPath ( "//" , rootConsoleRedirectHandler ) ;