Merged in changes from the 1.6.2 release. (Fixes for the filtering code

and the HTML installation script.)
This commit is contained in:
Robert James Kaes 2003-10-17 16:11:00 +00:00
parent 27d93b1f08
commit f2d846d057
4 changed files with 47 additions and 25 deletions

View File

@ -1,3 +1,17 @@
2003-10-17 Robert James Kaes <rjkaes@flarenet.com>
Released tinyproxy 1.6.2 (2003-10-17)
* Makefile.am:
Removed a redundant "mkdir" command, since the $(mkinstalldirs)
command handles it correctly.
2003-10-16 Robert James Kaes <rjkaes@flarenet.com>
* src/filter.c (filter_init):
Fixed up the comment handling code. Closes bug 822226
[https://sourceforge.net/tracker/index.php?func=detail&aid=822226&group_id=2632&atid=102632]
2003-08-06 Robert James Kaes <rjkaes@flarenet.com> 2003-08-06 Robert James Kaes <rjkaes@flarenet.com>
Released tinyproxy 1.6.1 (2003-08-06) Released tinyproxy 1.6.1 (2003-08-06)

View File

@ -40,7 +40,6 @@ tinyproxy-configure-file:
tinyproxy-html-files: tinyproxy-html-files:
$(mkinstalldirs) $(DESTDIR)$(datadir)/tinyproxy $(mkinstalldirs) $(DESTDIR)$(datadir)/tinyproxy
test -d $(DESTDIR)$(datadir)/tinyproxy || mkdir $(datadir)/tinyproxy
for file in debug default stats; do \ for file in debug default stats; do \
$(INSTALL) -m 644 $(srcdir)/doc/$$file.html $(DESTDIR)$(datadir)/tinyproxy/$$file.html.dist ; \ $(INSTALL) -m 644 $(srcdir)/doc/$$file.html $(DESTDIR)$(datadir)/tinyproxy/$$file.html.dist ; \
test -f $(DESTDIR)$(datadir)/tinyproxy/$$file.html || \ test -f $(DESTDIR)$(datadir)/tinyproxy/$$file.html || \

View File

@ -1,4 +1,4 @@
dnl $Id: configure.ac,v 2.63 2003-08-07 16:32:12 rjkaes Exp $ dnl $Id: configure.ac,v 2.64 2003-10-17 16:10:59 rjkaes Exp $
dnl Devlopers, please strive to achieve this order: dnl Devlopers, please strive to achieve this order:
dnl dnl

View File

@ -1,4 +1,4 @@
/* $Id: filter.c,v 1.18 2003-08-07 16:32:12 rjkaes Exp $ /* $Id: filter.c,v 1.19 2003-10-17 16:11:00 rjkaes Exp $
* *
* Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca) * Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca)
* Copyright (c) 2002 James E. Flemer (jflemer@acm.jhu.edu) * Copyright (c) 2002 James E. Flemer (jflemer@acm.jhu.edu)
@ -48,7 +48,7 @@ filter_init(void)
FILE *fd; FILE *fd;
struct filter_list *p; struct filter_list *p;
char buf[FILTER_BUFFER_LEN]; char buf[FILTER_BUFFER_LEN];
char *s, *t; char *s;
int cflags; int cflags;
if (!fl && !already_init) { if (!fl && !already_init) {
@ -63,29 +63,25 @@ filter_init(void)
cflags |= REG_ICASE; cflags |= REG_ICASE;
while (fgets(buf, FILTER_BUFFER_LEN, fd)) { while (fgets(buf, FILTER_BUFFER_LEN, fd)) {
/*
* Remove any trailing white space and
* comments.
*/
s = buf; s = buf;
if (!p) /* head of list */ while (*s) {
fl = p = if (isspace((unsigned char)*s)) break;
(struct filter_list*) if (*s == '#') {
safecalloc(1, /*
sizeof(struct * If the '#' char is preceeded by
filter_list)); * an escape, it's not a comment
else { /* next entry */ * string.
p->next = */
(struct filter_list*) if (s == buf || *(s - 1) != '\\')
safecalloc(1, break;
sizeof(struct }
filter_list)); ++s;
p = p->next;
} }
*s = '\0';
/* strip trailing whitespace & comments */
t = s;
while (*s && *s != '#') {
if (!isspace((unsigned char)*(s++)))
t = s;
}
*t = '\0';
/* skip leading whitespace */ /* skip leading whitespace */
s = buf; s = buf;
@ -96,6 +92,19 @@ filter_init(void)
if (*s == '\0') if (*s == '\0')
continue; continue;
if (!p) /* head of list */
fl = p =
safecalloc(1,
sizeof(struct
filter_list));
else { /* next entry */
p->next =
safecalloc(1,
sizeof(struct
filter_list));
p = p->next;
}
p->pat = safestrdup(s); p->pat = safestrdup(s);
p->cpat = (regex_t*)safemalloc(sizeof(regex_t)); p->cpat = (regex_t*)safemalloc(sizeof(regex_t));
if ((err = regcomp(p->cpat, p->pat, cflags)) != 0) { if ((err = regcomp(p->cpat, p->pat, cflags)) != 0) {