Skip to content

Commit

Permalink
removed empty host check, inherently within httpHost object generation (
Browse files Browse the repository at this point in the history
#1488)

Signed-off-by: Arnav Grover <[email protected]>
  • Loading branch information
Arnav-Gr0ver authored Nov 5, 2023
1 parent 510f50b commit 06c0cc5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public boolean isRedirected(HttpRequest request, HttpResponse response, HttpCont

@VisibleForTesting
protected static void validateSchemaAndPort(HttpHost host) {
if (Strings.isBlank(host.getHostName())) {
log.error("Remote inference host name is empty!");
throw new IllegalArgumentException("Host name is empty!");
}
String scheme = host.getSchemeName();
if ("http".equalsIgnoreCase(scheme) || "https".equalsIgnoreCase(scheme)) {
String[] hostNamePort = host.getHostName().split(":");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,4 @@ public void test_validateSchemaAndPort_portNotInRange_throwException() {
HttpHost httpHost = new HttpHost("api.openai.com:65537", -1, "https");
MLHttpClientFactory.validateSchemaAndPort(httpHost);
}

}

0 comments on commit 06c0cc5

Please sign in to comment.