diff -r -N -u ffproxy-1.3p1/ChangeLog ffproxy-1.3p2/ChangeLog --- ffproxy-1.3p1/ChangeLog Mon Aug 5 19:23:10 2002 +++ ffproxy-1.3p2/ChangeLog Mon May 12 00:40:32 2003 @@ -1,12 +1,31 @@ +Version 1.3p2 +============= + +* not using http://host/path style GET requests + anymore when not contacting an auxiliary proxy + +* fixed command line option -v behaviour: + ffproxy now terminates after displaying the + version number + +* fixed wrong db_path comment in sample.config: + path must be relative to new root but in no case + absolute because at first time read of the config + files ffproxy hasn't dropped its priviliges -- + because *after* reading them it knows that it + should do + Version 1.3p1 ============= * off by one error (reported by Oliver Kurth) [ r->header[i] = (char *) my_alloc(len); - in request.c ] + in request.c ] fixed * (hopefully) fixed compiling issues under linux (take a look at Makefile) + +* manpage was installed in wrong location, fixed -------------------------------------------------- Forgot sample.config in tar.gz for version 1.3, diff -r -N -u ffproxy-1.3p1/http.c ffproxy-1.3p2/http.c --- ffproxy-1.3p1/http.c Mon Aug 5 19:38:20 2002 +++ ffproxy-1.3p2/http.c Mon May 12 00:41:54 2003 @@ -1,7 +1,9 @@ /* - * ffproxy (c) 2002 Niklas Olmes http://faith.eu.org + * ffproxy (c) 2002, 2003 Niklas Olmes + * + * http://faith.eu.org * - * $Id: http.c,v 1.3 2002/07/25 12:24:10 niklas Exp $ + * $Id: http.c,v 1.4 2003/05/12 00:41:40 niklas Exp niklas $ * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -34,7 +36,7 @@ int http_url(struct req * r, const char *s) { - size_t i; + size_t i, k; char *p; if (strncmp(http_get, s, strlen(http_get)) == 0) { @@ -60,6 +62,7 @@ r->type = UNKNOWN; return -1; } + i = 0; while (i < strlen(http)) { r->url[i] = http[i]; @@ -74,17 +77,22 @@ r->type = UNKNOWN; return -1; } - while (i < sizeof(r->url) - 1 && *s != ' ' && *s != '\0') + + k = 0; + while (i < sizeof(r->url) - 1 && k < sizeof(r->urlpath) - 1 && *s != ' ' && *s != '\0' && isprint(*s)) { + r->urlpath[k++] = *s; r->url[i++] = *(s++); + } + if (k == 0) + r->urlpath[k++] = '/'; + r->urlpath[k] = '\0'; r->url[i] = '\0'; - if (*s != '/' && *s != ' ') { + if (*s != ' ') { r->type = UNKNOWN; return -1; } - while (i < sizeof(r->url) - 1 && *s != ' ' && *s != '\0') - r->url[i++] = *(s++); - r->url[i] = '\0'; + debug("http_url() => extracted urlpath (%s)", r->urlpath); debug("http_url() => extracted url (%s)", r->url); while (*s == ' ') diff -r -N -u ffproxy-1.3p1/main.c ffproxy-1.3p2/main.c --- ffproxy-1.3p1/main.c Mon Aug 5 19:38:20 2002 +++ ffproxy-1.3p2/main.c Mon May 12 00:41:41 2003 @@ -1,7 +1,9 @@ /* - * ffproxy (c) 2002 Niklas Olmes http://faith.eu.org + * ffproxy (c) 2002, 2003 Niklas Olmes + * + * http://faith.eu.org * - * $Id: main.c,v 1.16 2002/08/05 19:28:30 niklas Exp $ + * $Id: main.c,v 1.17 2003/05/12 00:41:40 niklas Exp niklas $ * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -37,8 +39,8 @@ static void usage(void); static void drop_privileges(void); -static const char version[] = "1.3p1"; -static const char rcsid[] = "$Id: main.c,v 1.16 2002/08/05 19:28:30 niklas Exp $"; +static const char version[] = "1.3p2"; +static const char rcsid[] = "$Id: main.c,v 1.17 2003/05/12 00:41:40 niklas Exp niklas $"; char loop_header[100]; struct cfg config; @@ -73,6 +75,7 @@ case 'v': (void) printf("ffproxy version %s, %s\n", version, rcsid); + exit(0); break; case 'd': config.daemon = 1; @@ -156,7 +159,8 @@ static void usage(void) { - (void) fprintf(stderr, "ffproxy %s -- (c) 2002 Niklas Olmes \n", version); + (void) fprintf(stderr, "ffproxy %s -- (c) 2002, 2003 Niklas Olmes \n", version); + (void) fprintf(stderr, " \n"); (void) fprintf(stderr, " GNU GPL. Website: http://faith.eu.org\n"); (void) fprintf(stderr, "usage: ffproxy [-vdsh] [-c host|ip] [-p port] [-x host|ip] [-X port] [-l max]\n" @@ -176,8 +180,7 @@ " -g gid change gid\n" " -r dir chroot to dir\n" " -D dir databases are in dir\n" - " -f file use config file\n" - "\n"); + " -f file use config file\n"); exit(1); } diff -r -N -u ffproxy-1.3p1/req.h ffproxy-1.3p2/req.h --- ffproxy-1.3p1/req.h Thu Jul 25 12:07:39 2002 +++ ffproxy-1.3p2/req.h Sun May 11 22:56:52 2003 @@ -8,6 +8,7 @@ struct req { char url[2048]; + char urlpath[2048]; char host[128]; unsigned int port; diff -r -N -u ffproxy-1.3p1/request.c ffproxy-1.3p2/request.c --- ffproxy-1.3p1/request.c Mon Aug 5 19:38:21 2002 +++ ffproxy-1.3p2/request.c Mon May 12 00:41:51 2003 @@ -1,7 +1,9 @@ /* - * ffproxy (c) 2002 Niklas Olmes http://faith.eu.org + * ffproxy (c) 2002, 2003 Niklas Olmes + * + * http://faith.eu.org * - * $Id: request.c,v 1.19 2002/08/05 19:27:33 niklas Exp $ + * $Id: request.c,v 1.20 2003/05/12 00:41:40 niklas Exp niklas $ * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free @@ -102,7 +104,8 @@ default: i = 0; } - (void) unlock(&r); + if(config.cache) + (void) unlock(&r); if (i != 0) err_msg(cl, &r, i); } @@ -251,7 +254,8 @@ "Host: %s:%d\r\n", ((r->type == GET) ? "GET" : ((r->type) == HEAD) ? "HEAD" : "POST"), - r->url, r->vmajor, r->vminor, + config.proxyip ? r->url : r->urlpath, + r->vmajor, r->vminor, r->host, r->port); i = 0; diff -r -N -u ffproxy-1.3p1/sample.config ffproxy-1.3p2/sample.config --- ffproxy-1.3p1/sample.config Thu Jul 25 11:08:33 2002 +++ ffproxy-1.3p2/sample.config Mon May 12 00:06:42 2003 @@ -49,7 +49,9 @@ # (default: current directory (./)) # (Note: if ffproxy runs chrooted, # give a path name relative to new root, or, -# if db_files_path is the same as root, use db_files_path /) +# if db_files_path is the same as root, use db_files_path ./ +# You have to start ffproxy in the new root directory, +# otherwise it won't find the database files) #db_files_path /var/ffproxy db_files_path ./