Updated copyright, license notices in source code

The notices have been changed to a more GNU look. Documentation
comments have been separated from the copyright header. I've tried to
keep all copyright notices intact. Some author contact details have
been updated.
This commit is contained in:
Mukund Sivaraman 2008-05-24 13:35:49 +05:30
parent b441485b5e
commit 249d4b7f33
45 changed files with 739 additions and 607 deletions

View File

@ -1,20 +1,24 @@
/* $Id: acl.c,v 1.22 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000, 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* This system handles Access Control for use of this daemon. A list of * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This system handles Access Control for use of this daemon. A list of
* domains, or IP addresses (including IP blocks) are stored in a list * domains, or IP addresses (including IP blocks) are stored in a list
* which is then used to compare incoming connections. * which is then used to compare incoming connections.
*
* Copyright (C) 2000,2002 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: acl.h,v 1.5 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'acl.c' for detailed information. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'acl.c' for detailed information. */
#ifndef TINYPROXY_ACL_H #ifndef TINYPROXY_ACL_H
#define TINYPROXY_ACL_H #define TINYPROXY_ACL_H

View File

@ -1,19 +1,23 @@
/* $Id: anonymous.c,v 1.16 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Handles insertion and searches for headers which should be let through when * This program is free software; you can redistribute it and/or modify
* the anonymous feature is turned on. * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version. */
*
* This program is distributed in the hope that it will be useful, but /* Handles insertion and searches for headers which should be let through
* WITHOUT ANY WARRANTY; without even the implied warranty of * when the anonymous feature is turned on.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: anonymous.h,v 1.7 2005-07-12 17:39:43 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'anonymous.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'anonymous.c' for detailed information. */
#ifndef _TINYPROXY_ANONYMOUS_H_ #ifndef _TINYPROXY_ANONYMOUS_H_
#define _TINYPROXY_ANONYMOUS_H_ #define _TINYPROXY_ANONYMOUS_H_

View File

@ -1,24 +1,28 @@
/* $Id: buffer.c,v 1.25 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1999, 2001 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* The buffer used in each connection is a linked list of lines. As the lines * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* The buffer used in each connection is a linked list of lines. As the lines
* are read in and written out the buffer expands and contracts. Basically, * are read in and written out the buffer expands and contracts. Basically,
* by using this method we can increase the buffer size dynamically. However, * by using this method we can increase the buffer size dynamically. However,
* we have a hard limit of 64 KB for the size of the buffer. The buffer can be * we have a hard limit of 64 KB for the size of the buffer. The buffer can be
* thought of as a queue were we act on both the head and tail. The various * thought of as a queue were we act on both the head and tail. The various
* functions act on each end (the names are taken from what Perl uses to act on * functions act on each end (the names are taken from what Perl uses to act on
* the ends of an array. :) * the ends of an array. :)
*
* Copyright (C) 1999,2001 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: buffer.h,v 1.10 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'buffer.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'buffer.c' for detailed information. */
#ifndef _TINYPROXY_BUFFER_H_ #ifndef _TINYPROXY_BUFFER_H_
#define _TINYPROXY_BUFFER_H_ #define _TINYPROXY_BUFFER_H_

View File

@ -1,19 +1,23 @@
/* $Id: child.c,v 1.18 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Handles the creation/destruction of the various children required for * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Handles the creation/destruction of the various children required for
* processing incoming connections. * processing incoming connections.
*
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: child.h,v 1.4 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'child.c' for more information. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'child.c' for detailed information. */
#ifndef TINYPROXY_CHILD_H #ifndef TINYPROXY_CHILD_H
#define TINYPROXY_CHILD_H #define TINYPROXY_CHILD_H

View File

@ -1,21 +1,25 @@
/* $Id: common.h,v 1.9 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* This file groups all the headers required throughout the tinyproxy * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This file groups all the headers required throughout the tinyproxy
* system. All this information use to be in the "tinyproxy.h" header, * system. All this information use to be in the "tinyproxy.h" header,
* but various other "libraries" in the program need the same information, * but various other "libraries" in the program need the same information,
* without the tinyproxy specific defines. * without the tinyproxy specific defines.
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#ifndef COMMON_HEADER_H #ifndef COMMON_HEADER_H

View File

@ -1,21 +1,25 @@
/* $Id: conffile.c,v 1.9 2005-11-04 05:15:47 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Parses the configuration file and sets up the config_s structure for * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Parses the configuration file and sets up the config_s structure for
* use by the application. This file replaces the old grammar.y and * use by the application. This file replaces the old grammar.y and
* scanner.l files. It takes up less space and _I_ think is easier to * scanner.l files. It takes up less space and _I_ think is easier to
* add new directives to. Who knows if I'm right though. * add new directives to. Who knows if I'm right though.
*
* Copyright (C) 2004 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"
@ -773,7 +777,7 @@ HANDLE_FUNC(handle_upstream)
} }
safefree(ip); safefree(ip);
return 0; return 0;
} }
@ -784,7 +788,7 @@ HANDLE_FUNC(handle_upstream_no)
domain = get_string_arg(line, &match[2]); domain = get_string_arg(line, &match[2]);
if (!domain) return -1; if (!domain) return -1;
upstream_add(NULL, 0, domain); upstream_add(NULL, 0, domain);
safefree(domain); safefree(domain);

View File

@ -1,20 +1,23 @@
/* $Id: conffile.h,v 1.2 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'conffile.c' for more details. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2004 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'conffile.c' for detailed information. */
#ifndef TINYPROXY_CONFFILE_H #ifndef TINYPROXY_CONFFILE_H
#define TINYPROXY_CONFFILE_H #define TINYPROXY_CONFFILE_H

View File

@ -1,21 +1,25 @@
/* $Id: conns.c,v 1.25 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2001 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Create and free the connection structure. One day there could be * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Create and free the connection structure. One day there could be
* other connection related tasks put here, but for now the header * other connection related tasks put here, but for now the header
* file and this file are only used for create/free functions and the * file and this file are only used for create/free functions and the
* connection structure definition. * connection structure definition.
*
* Copyright (C) 2001 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: conns.h,v 1.20 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2001 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'conns.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2001 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'conns.c' for detailed information. */
#ifndef TINYPROXY_CONNS_H #ifndef TINYPROXY_CONNS_H
#define TINYPROXY_CONNS_H #define TINYPROXY_CONNS_H

View File

@ -1,20 +1,24 @@
/* $Id: daemon.c,v 1.6 2005-08-15 18:35:09 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* This file contains functions which are useful when writing a * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This file contains functions which are useful when writing a
* daemon process. The functions include a "makedaemon" function and * daemon process. The functions include a "makedaemon" function and
* a function to portably set a signal handler. * a function to portably set a signal handler.
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: daemon.h,v 1.4 2005-08-15 18:35:09 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'daemon.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'daemon.c' for detailed information. */
#ifndef TINYPROXY_DAEMON_H #ifndef TINYPROXY_DAEMON_H
#define TINYPROXY_DAEMON_H #define TINYPROXY_DAEMON_H

View File

@ -1,21 +1,25 @@
/* $Id: filter.c,v 1.22 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1999 George Talusan <gstalusan@uwaterloo.ca>
* Copyright (C) 2002 James E. Flemer <jflemer@acm.jhu.edu>
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca) * This program is free software; you can redistribute it and/or modify
* Copyright (c) 2002 James E. Flemer (jflemer@acm.jhu.edu) * it under the terms of the GNU General Public License as published by
* Copyright (c) 2002 Robert James Kaes (rjkaes@users.sourceforge.net) * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* A substring of the domain to be filtered goes into the file * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* A substring of the domain to be filtered goes into the file
* pointed at by DEFAULT_FILTER. * pointed at by DEFAULT_FILTER.
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: filter.h,v 1.6 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1999 George Talusan <gstalusan@uwaterloo.ca>
* *
* See 'filter.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (c) 1999 George Talusan (gstalusan@uwaterloo.ca) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'filter.c' for detailed information. */
#ifndef _TINYPROXY_FILTER_H_ #ifndef _TINYPROXY_FILTER_H_
#define _TINYPROXY_FILTER_H_ #define _TINYPROXY_FILTER_H_

View File

@ -1,14 +1,5 @@
/* $Id: hashmap.c,v 1.17 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* * Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* A hashmap implementation. The keys are case-insensitive NULL terminated
* strings, and the data is arbitrary lumps of data. Copies of both the
* key and the data in the hashmap itself, so you must free the original
* key and data to avoid a memory leak. The hashmap returns a pointer
* to the data when a key is searched for, so take care in modifying the
* data as it's modifying the data stored in the hashmap. (In other words,
* don't try to free the data, or realloc the memory. :)
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -20,9 +11,18 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* A hashmap implementation. The keys are case-insensitive NULL terminated
* strings, and the data is arbitrary lumps of data. Copies of both the
* key and the data in the hashmap itself, so you must free the original
* key and data to avoid a memory leak. The hashmap returns a pointer
* to the data when a key is searched for, so take care in modifying the
* data as it's modifying the data stored in the hashmap. (In other words,
* don't try to free the data, or realloc the memory. :)
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"
@ -377,7 +377,7 @@ hashmap_return_entry(hashmap_t map, hashmap_iter iter, char **key, void **data)
/* /*
* Searches for _any_ occurrences of "key" within the hashmap. * Searches for _any_ occurrences of "key" within the hashmap.
* *
* Returns: negative upon an error * Returns: negative upon an error
* zero if no key is found * zero if no key is found
* count found * count found

View File

@ -1,14 +1,5 @@
/* $Id: hashmap.h,v 1.4 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* * Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* A hashmap implementation. The keys are case-insensitive NULL terminated
* strings, and the data is arbitrary lumps of data. Copies of both the
* key and the data in the hashmap itself, so you must free the original
* key and data to avoid a memory leak. The hashmap returns a pointer
* to the data when a key is searched for, so take care in modifying the
* data as it's modifying the data stored in the hashmap. (In other words,
* don't try to free the data, or realloc the memory. :)
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -20,11 +11,13 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
/* See 'hashmap.c' for detailed information. */
#ifndef _HASHMAP_H #ifndef _HASHMAP_H
#define _HASHMAP_H #define _HASHMAP_H
@ -110,7 +103,7 @@ extern "C" {
/* /*
* Searches for _any_ occurrances of "key" within the hashmap and returns the * Searches for _any_ occurrances of "key" within the hashmap and returns the
* number of matching entries. * number of matching entries.
* *
* Returns: negative upon an error * Returns: negative upon an error
* zero if no key is found * zero if no key is found
* count found (positive value) * count found (positive value)

View File

@ -1,22 +1,26 @@
/* $Id: heap.c,v 1.10 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Debugging versions of various heap related functions are combined * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Debugging versions of various heap related functions are combined
* here. The debugging versions include assertions and also print * here. The debugging versions include assertions and also print
* (to standard error) the function called along with the amount * (to standard error) the function called along with the amount
* of memory allocated, and where the memory is pointing. The * of memory allocated, and where the memory is pointing. The
* format of the log message is standardized. * format of the log message is standardized.
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: heap.h,v 1.6 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'heap.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'heap.c' for detailed information. */
#ifndef TINYPROXY_HEAP_H #ifndef TINYPROXY_HEAP_H
#define TINYPROXY_HEAP_H #define TINYPROXY_HEAP_H

View File

@ -1,19 +1,23 @@
/* $Id: htmlerror.c,v 1.8 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* * Copyright (C) 2003 Steven Young <sdyoung@miranda.org>
* This file contains source code for the handling and display of *
* 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This file contains source code for the handling and display of
* HTML error pages with variable substitution. * HTML error pages with variable substitution.
*
* Copyright (C) 2003 Steven Young <sdyoung@well.com>
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"
@ -213,7 +217,7 @@ send_http_error_message(struct conn_s *connptr)
return (ret); return (ret);
} }
/* /*
* Add a key -> value mapping for HTML file substitution. * Add a key -> value mapping for HTML file substitution.
*/ */

View File

@ -1,21 +1,23 @@
/* $Id: htmlerror.h,v 1.3 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2003 Steven Young <sdyoung@miranda.org>
* *
* Contains header declarations for the HTML error functions in * This program is free software; you can redistribute it and/or modify
* htmlerror.c * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2003 Steven Young <sdyoung@well.com> * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'htmlerror.c' for detailed information. */
#ifndef TINYPROXY_HTMLERROR_H #ifndef TINYPROXY_HTMLERROR_H
#define TINYPROXY_HTMLERROR_H #define TINYPROXY_HTMLERROR_H

View File

@ -1,20 +1,23 @@
/* $Id: http-message.c,v 1.6 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2003 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'http-message.h' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2003 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'http-message.h' for detailed information. */
#include "common.h" #include "common.h"
#include "heap.h" #include "heap.h"
#include "http-message.h" #include "http-message.h"

View File

@ -1,6 +1,22 @@
/* $Id: http-message.h,v 1.3 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2003 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* HTTP Message API * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* HTTP Message API
* ---------------- * ----------------
* The idea behind this application programming interface (API) is to * The idea behind this application programming interface (API) is to
* represent an HTTP response message as a concrete entity. The API * represent an HTTP response message as a concrete entity. The API
@ -26,18 +42,6 @@
* http_message_t out of the calling function since the stack * http_message_t out of the calling function since the stack
* allocated memory referenced by the http_message_t will no long * allocated memory referenced by the http_message_t will no long
* exist.) * exist.)
*
* Copyright (C) 2003 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#ifndef _TINYPROXY_HTTP_MESSAGE_H_ #ifndef _TINYPROXY_HTTP_MESSAGE_H_

View File

@ -1,20 +1,24 @@
/* $Id: log.c,v 1.31 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Logs the various messages which tinyproxy produces to either a log file or * This program is free software; you can redistribute it and/or modify
* the syslog daemon. Not much to it... * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version. */
*
* This program is distributed in the hope that it will be useful, but /* Logs the various messages which tinyproxy produces to either a log file
* WITHOUT ANY WARRANTY; without even the implied warranty of * or the syslog daemon. Not much to it...
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,21 +1,24 @@
/* $Id: log.h,v 1.13 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'log.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'log.c' for detailed information. */
#ifndef TINYPROXY_LOG_H #ifndef TINYPROXY_LOG_H
#define TINYPROXY_LOG_H #define TINYPROXY_LOG_H
@ -29,7 +32,7 @@
* can see them below and I'll describe what each level should be for. * can see them below and I'll describe what each level should be for.
* Hopefully tinyproxy will remain consistent with these levels. * Hopefully tinyproxy will remain consistent with these levels.
* -- rjkaes * -- rjkaes
* Sorry but I had to destroy the hope ;-) There was a need to log * Sorry but I had to destroy the hope ;-) There was a need to log
* connections without the INFO stuff and not to have them as NOTICE. * connections without the INFO stuff and not to have them as NOTICE.
* -- hgb * -- hgb
* *
@ -59,7 +62,7 @@
* now it is used for actions like creating/destroying children, * now it is used for actions like creating/destroying children,
* unauthorized access, signal handling, etc. * unauthorized access, signal handling, etc.
* *
* LOG_CONN This additional level is for logging connections only, so * LOG_CONN This additional level is for logging connections only, so
* it is easy to control only the requests in the logfile. * it is easy to control only the requests in the logfile.
* If we log through syslog, this is set to LOG_INFO. * If we log through syslog, this is set to LOG_INFO.
* -- hgb * -- hgb

View File

@ -1,22 +1,26 @@
/* $Id: network.c,v 1.5 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002, 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* The functions found here are used for communicating across a * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* The functions found here are used for communicating across a
* network. They include both safe reading and writing (which are * network. They include both safe reading and writing (which are
* the basic building blocks) along with two functions for * the basic building blocks) along with two functions for
* easily reading a line of text from the network, and a function * easily reading a line of text from the network, and a function
* to write an arbitrary amount of data to the network. * to write an arbitrary amount of data to the network.
*
* Copyright (C) 2002,2004 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: network.h,v 1.3 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002, 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'network.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2002,2004 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'network.c' for detailed information. */
#ifndef TINYPROXY_NETWORK_H #ifndef TINYPROXY_NETWORK_H
#define TINYPROXY_NETWORK_H #define TINYPROXY_NETWORK_H

View File

@ -1,24 +1,28 @@
/* $Id: reqs.c,v 1.121 2005-08-16 04:03:19 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999-2005 Robert James Kaes <rjkaes@users.sourceforge.net>
* Copyright (C) 2000 Chris Lightfoot <chris@ex-parrot.com>
* Copyright (C) 2002 Petr Lampa <lampa@fit.vutbr.cz>
* *
* This is where all the work in tinyproxy is actually done. Incoming * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This is where all the work in tinyproxy is actually done. Incoming
* connections have a new child created for them. The child then * connections have a new child created for them. The child then
* processes the headers from the client, the response from the server, * processes the headers from the client, the response from the server,
* and then relays the bytes between the two. * and then relays the bytes between the two.
*
* Copyright (C) 1998 Steven Young
* Copyright (C) 1999-2005 Robert James Kaes (rjkaes@users.sourceforge.net)
* Copyright (C) 2000 Chris Lightfoot (chris@ex-parrot.com)
* Copyright (C) 2002 Petr Lampa (lampa@fit.vutbr.cz)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,21 +1,24 @@
/* $Id: reqs.h,v 1.7 2005-08-16 04:03:19 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'reqs.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'reqs.c' for detailed information. */
#ifndef _TINYPROXY_REQS_H_ #ifndef _TINYPROXY_REQS_H_
#define _TINYPROXY_REQS_H_ #define _TINYPROXY_REQS_H_

View File

@ -1,20 +1,23 @@
/* $Id: reverse-proxy.c,v 1.1 2005-08-16 04:03:19 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1999-2005 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Allow tinyproxy to be used as a reverse proxy. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1999-2005 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* Allow tinyproxy to be used as a reverse proxy. */
#include "tinyproxy.h" #include "tinyproxy.h"
#include "reverse-proxy.h" #include "reverse-proxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: reverse-proxy.h,v 1.1 2005-08-16 04:03:19 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2005 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'reverse-proxy.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2005 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'reverse-proxy.c' for detailed information. */
#ifndef TINYPROXY_REVERSE_PROXY_H #ifndef TINYPROXY_REVERSE_PROXY_H
#define TINYPROXY_REVERSE_PROXY_H #define TINYPROXY_REVERSE_PROXY_H

View File

@ -1,24 +1,28 @@
/* $Id: sock.c,v 1.43 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999, 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* Copyright (C) 2000 Chris Lightfoot <chris@ex-parrot.com>
* *
* Sockets are created and destroyed here. When a new connection comes in from * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Sockets are created and destroyed here. When a new connection comes in from
* a client, we need to copy the socket and the create a second socket to the * a client, we need to copy the socket and the create a second socket to the
* remote server the client is trying to connect to. Also, the listening * remote server the client is trying to connect to. Also, the listening
* socket is created and destroyed here. Sounds more impressive than it * socket is created and destroyed here. Sounds more impressive than it
* actually is. * actually is.
*
* Copyright (C) 1998 Steven Young
* Copyright (C) 1999,2004 Robert James Kaes (rjkaes@users.sourceforge.net)
* Copyright (C) 2000 Chris Lightfoot (chris@ex-parrot.com)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,21 +1,24 @@
/* $Id: sock.h,v 1.14 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999, 2004 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'sock.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999,2004 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'sock.c' for detailed information. */
#ifndef TINYPROXY_SOCK_H #ifndef TINYPROXY_SOCK_H
#define TINYPROXY_SOCK_H #define TINYPROXY_SOCK_H

View File

@ -1,24 +1,28 @@
/* $Id: stats.c,v 1.18 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* This module handles the statistics for tinyproxy. There are only two * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* This module handles the statistics for tinyproxy. There are only two
* public API functions. The reason for the functions, rather than just a * public API functions. The reason for the functions, rather than just a
* external structure is that tinyproxy is now multi-threaded and we can * external structure is that tinyproxy is now multi-threaded and we can
* not allow more than one child to access the statistics at the same * not allow more than one child to access the statistics at the same
* time. This is prevented by a mutex. If there is a need for more * time. This is prevented by a mutex. If there is a need for more
* statistics in the future, just add to the structure, enum (in the header), * statistics in the future, just add to the structure, enum (in the header),
* and the switch statement in update_stats(). * and the switch statement in update_stats().
*
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: stats.h,v 1.6 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2000 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'stats.h' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2000 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'stats.c' for detailed information. */
#ifndef _TINYPROXY_STATS_H_ #ifndef _TINYPROXY_STATS_H_
#define _TINYPROXY_STATS_H_ #define _TINYPROXY_STATS_H_

View File

@ -1,21 +1,25 @@
/* $Id: text.c,v 1.5 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* The functions included here are useful for text manipulation. They * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* The functions included here are useful for text manipulation. They
* replace or augment the standard C string library. These functions * replace or augment the standard C string library. These functions
* are either safer replacements, or they provide services not included * are either safer replacements, or they provide services not included
* with the standard C string library. * with the standard C string library.
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,20 +1,23 @@
/* $Id: text.h,v 1.4 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'text.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net) * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'text.c' for detailed information. */
#ifndef TINYPROXY_TEXT_H #ifndef TINYPROXY_TEXT_H
#define TINYPROXY_TEXT_H #define TINYPROXY_TEXT_H

View File

@ -1,25 +1,29 @@
/* $Id: tinyproxy.c,v 1.52 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1998-2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* Copyright (C) 2000 Chris Lightfoot <chris@ex-parrot.com>
* *
* The initialize routine. Basically sets up all the initial stuff (logfile, * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* The initialize routine. Basically sets up all the initial stuff (logfile,
* listening socket, config options, etc.) and then sits there and loops * listening socket, config options, etc.) and then sits there and loops
* over the new connections until the daemon is closed. Also has additional * over the new connections until the daemon is closed. Also has additional
* functions to handle the "user friendly" aspects of a program (usage, * functions to handle the "user friendly" aspects of a program (usage,
* stats, etc.) Like any good program, most of the work is actually done * stats, etc.) Like any good program, most of the work is actually done
* elsewhere. * elsewhere.
*
* Copyright (C) 1998 Steven Young
* Copyright (C) 1998-2002 Robert James Kaes (rjkaes@users.sourceforge.net)
* Copyright (C) 2000 Chris Lightfoot (chris@ex-parrot.com>
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"
@ -39,7 +43,7 @@
RETSIGTYPE takesig(int sig); RETSIGTYPE takesig(int sig);
/* /*
* Global Structures * Global Structures
*/ */
struct config_s config; struct config_s config;

View File

@ -1,21 +1,24 @@
/* $Id: tinyproxy.h,v 1.48 2005-08-16 04:03:19 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'tinyproxy.c' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'tinyproxy.c' for detailed information. */
#ifndef TINYPROXY_TINYPROXY_H #ifndef TINYPROXY_TINYPROXY_H
#define TINYPROXY_TINYPROXY_H #define TINYPROXY_TINYPROXY_H
@ -79,19 +82,19 @@ struct config_s {
*/ */
char *via_proxy_name; char *via_proxy_name;
/* /*
* Error page support. Map error numbers to file paths. * Error page support. Map error numbers to file paths.
*/ */
hashmap_t errorpages; hashmap_t errorpages;
/* /*
* Error page to be displayed if appropriate page cannot be located * Error page to be displayed if appropriate page cannot be located
* in the errorpages structure. * in the errorpages structure.
*/ */
char *errorpage_undef; char *errorpage_undef;
/* /*
* The HTML statistics page. * The HTML statistics page.
*/ */
char *statpage; char *statpage;
}; };

View File

@ -1,22 +1,26 @@
/* $Id: utils.c,v 1.40 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999-2003 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* Misc. routines which are used by the various functions to handle strings * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* Misc. routines which are used by the various functions to handle strings
* and memory allocation and pretty much anything else we can think of. Also, * and memory allocation and pretty much anything else we can think of. Also,
* the load cutoff routine is in here. Could not think of a better place for * the load cutoff routine is in here. Could not think of a better place for
* it, so it's in here. * it, so it's in here.
*
* Copyright (C) 1998 Steven Young
* Copyright (C) 1999-2003 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,21 +1,24 @@
/* $Id: utils.h,v 1.25 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* Copyright (C) 1998 Steven Young <sdyoung@miranda.org>
* Copyright (C) 1999 Robert James Kaes <rjkaes@users.sourceforge.net>
* *
* See 'utils.h' for a detailed description. * 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 Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
* Copyright (C) 1998 Steven Young * This program is distributed in the hope that it will be useful,
* Copyright (C) 1999 Robert James Kaes (rjkaes@users.sourceforge.net) * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* *
* This program is free software; you can redistribute it and/or modify it * You should have received a copy of the GNU General Public License along
* under the terms of the GNU General Public License as published by the * with this program; if not, write to the Free Software Foundation, Inc.,
* Free Software Foundation; either version 2, or (at your option) any * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/ */
/* See 'utils.c' for detailed information. */
#ifndef TINYPROXY_UTILS_H #ifndef TINYPROXY_UTILS_H
#define TINYPROXY_UTILS_H #define TINYPROXY_UTILS_H

View File

@ -1,10 +1,5 @@
/* $Id: vector.c,v 1.13 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* * Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* A vector implementation. The vector can be of an arbitrary length, and
* the data for each entry is an lump of data (the size is stored in the
* vector.)
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,9 +11,14 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* A vector implementation. The vector can be of an arbitrary length, and
* the data for each entry is an lump of data (the size is stored in the
* vector.)
*/ */
#include "tinyproxy.h" #include "tinyproxy.h"

View File

@ -1,10 +1,5 @@
/* $Id: vector.h,v 1.7 2005-08-15 03:54:31 rjkaes Exp $ /* tinyproxy - A fast light-weight HTTP proxy
* * Copyright (C) 2002 Robert James Kaes <rjkaes@users.sourceforge.net>
* A vector implementation. The vector can be of an arbritrary length, and
* the data for each entry is an lump of data (the size is stored in the
* vector.)
*
* Copyright (C) 2002 Robert James Kaes (rjkaes@users.sourceforge.net)
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -16,11 +11,13 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
/* See 'vector.c' for detailed information. */
#ifndef _VECTOR_H #ifndef _VECTOR_H
#define _VECTOR_H #define _VECTOR_H