This commit is contained in:
Mark Payne 2015-02-23 14:56:41 -05:00
commit 705ee852bb
2 changed files with 9 additions and 1 deletions

View File

@ -370,6 +370,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (uri.getScheme() == null || uri.getHost() == null) {
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestProcessGroupDTO.getTargetUri());
}
if (!(uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https"))) {
throw new IllegalArgumentException("The specified remote process group URL is invalid because it is not http or https: " + requestProcessGroupDTO.getTargetUri());
}
// normalize the uri to the other controller
String controllerUri = uri.toString();
@ -860,6 +864,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
if (uri.getScheme() == null || uri.getHost() == null) {
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestRemoteProcessGroup.getTargetUri());
}
if (!(uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https"))) {
throw new IllegalArgumentException("The specified remote process group URL is invalid because it is not http or https: " + requestRemoteProcessGroup.getTargetUri());
}
// normalize the uri to the other controller
String controllerUri = uri.toString();

View File

@ -20,7 +20,7 @@
<div class="setting">
<div class="setting-name">URL</div>
<div class="setting-field">
<input id="new-remote-process-group-uri" type="text"/>
<input id="new-remote-process-group-uri" type="text" placeholder="https://remotehost:8080/nifi"/>
</div>
</div>
</div>