diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-06-06 20:30:04 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-06-06 20:30:04 +0000 |
commit | 0242d89877ff2af3d70d81091d2a6ffc63c10c07 (patch) | |
tree | b40ebc06a57fa135b2780893ae624b7b5a10b372 | |
parent | 06d38ce529791671ae30232e1513b3f94c542635 (diff) | |
download | tinyproxy-0242d89877ff2af3d70d81091d2a6ffc63c10c07.tar.gz tinyproxy-0242d89877ff2af3d70d81091d2a6ffc63c10c07.zip |
(filter_domain): Removed code which stripped of a port number from the host name. The "host" variable will _always_ be just the name by the time filter_domain() is called.
Diffstat (limited to '')
-rw-r--r-- | src/filter.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/filter.c b/src/filter.c index 853c4b6..23275fc 100644 --- a/src/filter.c +++ b/src/filter.c @@ -1,4 +1,4 @@ -/* $Id: filter.c,v 1.11 2002-05-27 01:56:22 rjkaes Exp $ +/* $Id: filter.c,v 1.12 2002-06-06 20:30:04 rjkaes Exp $ * * Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca) * Copyright (c) 2002 James E. Flemer (jflemer@acm.jhu.edu) @@ -21,6 +21,7 @@ #include "filter.h" #include "heap.h" +#include "log.h" #include "regexp.h" #include "reqs.h" @@ -133,27 +134,18 @@ int filter_domain(const char *host) { struct filter_list *p; - char *s, *port; int result; if (!fl || !already_init) return (0); - /* strip off the port number */ - s = safestrdup(host); - port = strchr(s, ':'); - if (port) - *port = '\0'; - result = 0; - for (p = fl; p; p = p->next) { - result = !regexec(p->cpat, s, (size_t) 0, (regmatch_t *) 0, 0); + result = !regexec(p->cpat, host, (size_t) 0, (regmatch_t *) 0, 0); if (result) break; } - safefree(s); return (result); } |