Lines Matching refs:hostname
30 /* Determine if "url" matches the hostname, scheme and port and path
37 /* Scheme, hostname port and local part. The filter URI and the
40 * <scheme>[:://<hostname>[:<port>][/<path>]]
43 * scheme for equality, and then if present we match the hostname,
52 if (url->scheme || url->hostname) {
62 /* If the filter hostname is null or empty it matches any hostname,
63 * if it begins with a "*" it matches the _end_ of the URI hostname
65 * of the URI * hostname including the ".", otherwise it must match
66 * the URI hostname exactly. */
68 if (filter->hostname && filter->hostname[0]) {
69 if (filter->hostname[0] == '.') {
70 const size_t fhostlen = strlen(filter->hostname);
71 const size_t uhostlen = url->hostname ? strlen(url->hostname) : 0;
74 || (url->hostname
75 && strcasecmp(filter->hostname,
76 url->hostname + uhostlen - fhostlen))) {
80 else if (filter->hostname[0] == '*') {
81 const size_t fhostlen = strlen(filter->hostname + 1);
82 const size_t uhostlen = url->hostname ? strlen(url->hostname) : 0;
85 || (url->hostname
86 && strcasecmp(filter->hostname + 1,
87 url->hostname + uhostlen - fhostlen))) {
91 else if (!url->hostname || strcasecmp(filter->hostname, url->hostname)) {