look for `unix:` rather than `unix:/` since we support relative paths
do the case sensitive match if one of the host is unix, that's
sufficient
@@ -123,10 +123,10 @@ inline h2o_iovec_t h2o_url_stringify(h2o_mem_pool_t *pool, const h2o_url_t *url)
static inline int h2o_url_host_is_unix_path(h2o_iovec_t host)
{
- if (host.len < 6) {
+ if (host.len < 5) {
return 0;
}
- return h2o_memis(host.base, 6, H2O_STRLIT("unix:/"));
+ return h2o_memis(host.base, 5, H2O_STRLIT("unix:"));
}
/**
@@ -138,7 +138,7 @@ static inline int h2o_url_hosts_are_equal(const h2o_url_t *url_a, const h2o_url_
if (url_a->host.len != url_b->host.len)
return 0;
- if (h2o_url_host_is_unix_path(url_a->host) && h2o_url_host_is_unix_path(url_b->host))
+ if (h2o_url_host_is_unix_path(url_a->host))
return h2o_memis(url_a->host.base, url_a->host.len, url_b->host.base, url_b->host.len);
else
return h2o_lcstris(url_a->host.base, url_a->host.len, url_b->host.base, url_b->host.len);
