Skip to content

Commit

Permalink
HDDS-1235. BaseHttpServer NPE is HTTP policy is HTTPS_ONLY. Contribut…
Browse files Browse the repository at this point in the history
…ed by Xiaoyu Yao.

Closes #572
  • Loading branch information
xiaoyuyao committed Mar 9, 2019
1 parent 8458ced commit 11db469
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -65,14 +65,10 @@ public abstract class BaseHttpServer {
public BaseHttpServer(Configuration conf, String name) throws IOException {
this.name = name;
this.conf = conf;
policy = DFSUtil.getHttpPolicy(conf);
if (isEnabled()) {
policy = DFSUtil.getHttpPolicy(conf);
if (policy.isHttpEnabled()) {
this.httpAddress = getHttpBindAddress();
}
if (policy.isHttpsEnabled()) {
this.httpsAddress = getHttpsBindAddress();
}
this.httpAddress = getHttpBindAddress();
this.httpsAddress = getHttpsBindAddress();
HttpServer2.Builder builder = null;
builder = DFSUtil.httpServerTemplateForNNAndJN(conf, this.httpAddress,
this.httpsAddress, name, getSpnegoPrincipal(), getKeytabFile());
Expand Down

0 comments on commit 11db469

Please sign in to comment.