Skip to content

Commit

Permalink
Refactor secret check
Browse files Browse the repository at this point in the history
Moving the check to start allows invalid configurations to be fixed via
JMX and changes to be made followed by stop()/start() for those changes
to take effect.
  • Loading branch information
markt-asf committed Feb 5, 2020
1 parent 6193d3b commit 03c4361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/org/apache/coyote/ajp/AbstractAjpProtocol.java
Expand Up @@ -267,13 +267,13 @@ protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket,


@Override
public void init() throws Exception {
public void start() throws Exception {
if (getSecretRequired()) {
String secret = getSecret();
if (secret == null || secret.length() == 0) {
throw new IllegalArgumentException(sm.getString("ajpprotocol.nosecret"));
}
}
super.init();
super.start();
}
}

0 comments on commit 03c4361

Please sign in to comment.