Skip to content
Snippets Groups Projects
Commit f91cef84 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Ignore protocol case and trailing slash

parent d2b7ee82
No related merge requests found
......@@ -89,14 +89,14 @@ socklen_t eb_posix_ip_resolve(const char* prefix, const char* address, int type,
const char* port, *slash;
len = strlen(prefix);
if (strncmp(address, prefix, len))
if (strncasecmp(address, prefix, len))
return -1;
address += len;
if (strlen(address) >= sizeof(host)-1)
return -1;
slash = strchr(address, '/');
if (slash == 0) {
if (slash == 0 || *(slash+1) == 0) {
strcpy(host, address);
port = EB_DEFAULT_PORT_STR;
} else {
......
......@@ -60,14 +60,14 @@ eb_status_t eb_ssh_connect(struct eb_transport* transportp, struct eb_link* link
link = (struct eb_ssh_link*)linkp;
if (strncmp(address, "ssh/", 4))
if (strncasecmp(address, "ssh/", 4))
return EB_ADDRESS;
address += 4;
if (strlen(address) >= sizeof(host)-1)
return EB_ADDRESS;
slash = strchr(address, '/');
if (slash == 0) {
if (slash == 0 || *(slash+1) == 0) {
strcpy(host, address);
command = "eb_proxy";
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment