Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFCORE-3999] Allow registering a custom HTTP handler for management interface #3427

Conversation

jmesnil
Copy link
Member

@jmesnil jmesnil commented Aug 9, 2018

  • add addManagementHandler(String, boolean, HttpHandler) method to the
    ExtensibleHttpManagement API

JIRA: https://issues.jboss.org/browse/WFCORE-3999
Proposal: wildfly/wildfly-proposals#117

…interface

* add addManagementHandler(String, boolean, HttpHandler) method to the
  ExtensibleHttpManagement API

JIRA: https://issues.jboss.org/browse/WFCORE-3999
String context = fixPath(contextName);
// Reject reserved contexts or duplicate extensions
if (extensionHandlers.reservedContexts.contains(context) || !extensionHandlers.extensionContexts.add(context)) {
throw new IllegalStateException();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error message could be handy

@@ -141,14 +142,27 @@ private void test(final ManagementClient managementClient) throws IOException {
final String staticUrlDirectory = urlBase + "static/";
final String badStaticUrl = urlBase + "static/bad.txt";
final String errorUrl = urlBase + "error/index.html";
final String securedDynamicUrl = urlBase + "secured-dynamic/";
final String unsecuredDynamicUrl = urlBase + "unsecured-dynamic/";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried without trailing / and tests are passing too. Probably not worth specific test as this use-case will be covered by /health endpoint in mp health work

@jmesnil jmesnil added ready-for-merge This PR is ready to be merged and fulfills all requirements Feature This PR adds a new feature to WildFly 6.x labels Aug 10, 2018
@jmesnil
Copy link
Member Author

jmesnil commented Aug 10, 2018

retest this please

@jmesnil jmesnil merged commit 6ae5ad6 into wildfly:master Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR adds a new feature to WildFly ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
3 participants