Robert James Kaes [Sun, 16 Sep 2001 20:11:07 +0000 (20:11 +0000)]
Moved the safe_write() and safe_read() functions here.
Robert James Kaes [Sun, 16 Sep 2001 20:10:19 +0000 (20:10 +0000)]
Moved the safe_read() and safe_write() functions into the sock.c file
since they're now used in other places.
Added support for a true upstream proxy connection. This involved some
rewriting of the handle_connection() function and some of the support
functions so that they do perform the domain filtering and anonymous
filtering while still connecting to the upstream proxy. I think the code
should be cleaned up further.
Robert James Kaes [Sun, 16 Sep 2001 20:08:24 +0000 (20:08 +0000)]
Added the token for Upstream and the code the handle the upstream
directive in the configuration file.
Robert James Kaes [Sun, 16 Sep 2001 20:07:50 +0000 (20:07 +0000)]
Added the example for the upstream proxy directive.
Robert James Kaes [Sun, 16 Sep 2001 20:07:24 +0000 (20:07 +0000)]
Added a configure option for upstream proxy support.
Bumped the version number.
Robert James Kaes [Sun, 16 Sep 2001 20:06:51 +0000 (20:06 +0000)]
Added upstream proxy support.
Robert James Kaes [Sun, 16 Sep 2001 05:38:27 +0000 (05:38 +0000)]
Fixed a problem where log messages could be missed during a rotate.
Robert James Kaes [Sat, 15 Sep 2001 21:32:24 +0000 (21:32 +0000)]
More changes.
Robert James Kaes [Sat, 15 Sep 2001 21:29:59 +0000 (21:29 +0000)]
Added the send_http_message() function to handle sending messages back to
the client. It's used by httperr() and showstats().
Robert James Kaes [Sat, 15 Sep 2001 21:29:22 +0000 (21:29 +0000)]
Changed to rotating the log file instead of truncating it. Also using the
create_file_safely() function to eliminate potential security problems.
Robert James Kaes [Sat, 15 Sep 2001 21:28:25 +0000 (21:28 +0000)]
Removed the memory allocation log messages.
Robert James Kaes [Sat, 15 Sep 2001 21:27:58 +0000 (21:27 +0000)]
Changed to using the send_http_message() function so that the HTTP headers
are sent properly.
Robert James Kaes [Sat, 15 Sep 2001 21:26:14 +0000 (21:26 +0000)]
Removed the log messages related to memory allocation.
Move the SSL response header into into own function.
Added support for the status host.
Robert James Kaes [Sat, 15 Sep 2001 21:24:18 +0000 (21:24 +0000)]
Removed the log message when unable to allocate memory.
Robert James Kaes [Sat, 15 Sep 2001 21:21:01 +0000 (21:21 +0000)]
Updated the authorization string.
Robert James Kaes [Fri, 14 Sep 2001 23:45:15 +0000 (23:45 +0000)]
The biggest change is the added support for SSL.
Robert James Kaes [Fri, 14 Sep 2001 23:44:47 +0000 (23:44 +0000)]
Bumped up version number.
Robert James Kaes [Fri, 14 Sep 2001 23:43:59 +0000 (23:43 +0000)]
Removed these files since their functionality has been replaced.
Robert James Kaes [Fri, 14 Sep 2001 21:16:56 +0000 (21:16 +0000)]
Finally got the SSL problem fixed. We can not send _any_ client headers
(including the new line) to the origin server when in tunnelling mode. SSL
now works correctly. Yeah.
Robert James Kaes [Fri, 14 Sep 2001 19:50:45 +0000 (19:50 +0000)]
Changed the buffer pointer in safe_write() to be const void* since we're
not changing the values.
Instead of building a new request and memory, simply send each part
separately. Actually uses less memory _and_ less code.
Robert James Kaes [Fri, 14 Sep 2001 19:49:10 +0000 (19:49 +0000)]
When logging an error indicate the file descriptor and the error number.
Robert James Kaes [Fri, 14 Sep 2001 04:56:58 +0000 (04:56 +0000)]
Include the SSL field in the connection structure since we're going to
handle SSL connections.
Robert James Kaes [Fri, 14 Sep 2001 04:56:29 +0000 (04:56 +0000)]
Massive changes. Split process_method() into a bunch of smaller files and
changed the parsing code from REGEX and uri.c to a simplier sscanf()
method. Also, include code to handle SSL connections, but that's not quite
working yet.
Robert James Kaes [Fri, 14 Sep 2001 04:55:06 +0000 (04:55 +0000)]
Removed the reference to uri.c and uri.h since the new reqs.c doesn't use
them.
Robert James Kaes [Wed, 12 Sep 2001 03:33:43 +0000 (03:33 +0000)]
Fixed a memory leak in process_method().
Robert James Kaes [Wed, 12 Sep 2001 03:33:15 +0000 (03:33 +0000)]
Fixed memory leak.
Robert James Kaes [Wed, 12 Sep 2001 03:32:54 +0000 (03:32 +0000)]
Changed mallocs to callocs.
Robert James Kaes [Wed, 12 Sep 2001 03:32:24 +0000 (03:32 +0000)]
Increased the number of "insertions" before the free memory.
Robert James Kaes [Tue, 11 Sep 2001 19:28:00 +0000 (19:28 +0000)]
More changes. These all relate to the switch from stack memory to heap
memory.
Robert James Kaes [Tue, 11 Sep 2001 19:27:27 +0000 (19:27 +0000)]
Added the debugging realloc() function.
Robert James Kaes [Tue, 11 Sep 2001 19:27:09 +0000 (19:27 +0000)]
Set the stack size of threads to 32KB from 128KB.
Robert James Kaes [Tue, 11 Sep 2001 19:26:49 +0000 (19:26 +0000)]
Switched the memory allocation for the large strings to heap based instead
of stack based.
Robert James Kaes [Tue, 11 Sep 2001 19:24:44 +0000 (19:24 +0000)]
Bumped up the preversion number
Robert James Kaes [Tue, 11 Sep 2001 04:38:23 +0000 (04:38 +0000)]
Style stuff.
Robert James Kaes [Tue, 11 Sep 2001 04:21:18 +0000 (04:21 +0000)]
Updated version number.
Robert James Kaes [Tue, 11 Sep 2001 04:14:43 +0000 (04:14 +0000)]
Fixed a memory leak.
Robert James Kaes [Tue, 11 Sep 2001 04:13:58 +0000 (04:13 +0000)]
Used safecalloc() instead of malloc() and memset(). Fixed a potential
memory leak with the regular expression engine.
Robert James Kaes [Tue, 11 Sep 2001 04:12:47 +0000 (04:12 +0000)]
Comment cleanup.
Robert James Kaes [Sat, 8 Sep 2001 18:59:13 +0000 (18:59 +0000)]
More changes.
Robert James Kaes [Sat, 8 Sep 2001 18:58:57 +0000 (18:58 +0000)]
New pre version
Robert James Kaes [Sat, 8 Sep 2001 18:58:37 +0000 (18:58 +0000)]
Changed all the mallocs and callocs to use the new safemalloc and
safecalloc.
Robert James Kaes [Sat, 8 Sep 2001 18:58:02 +0000 (18:58 +0000)]
Lowered the number BUFARRAY and BUFSIZE constants to reduce the maximum
memory usage of a ternary tree. It now should not exceed 4MB of memory.
Robert James Kaes [Sat, 8 Sep 2001 18:56:30 +0000 (18:56 +0000)]
Lowered the number of insertions before the ternary tree is rebuilt.
Robert James Kaes [Sat, 8 Sep 2001 18:55:58 +0000 (18:55 +0000)]
Added the debugging_(malloc|calloc|free) functions to help track memory
usage. There are also now defines for safe(malloc|calloc|free) which allow
for debugging code to be enabled or not.
Robert James Kaes [Sat, 8 Sep 2001 06:29:04 +0000 (06:29 +0000)]
Fixed a memory leak in thread_main().
Robert James Kaes [Fri, 7 Sep 2001 18:19:39 +0000 (18:19 +0000)]
Explictly added the DETACHED creation method on threads.
Robert James Kaes [Fri, 7 Sep 2001 04:21:53 +0000 (04:21 +0000)]
Updates.
Robert James Kaes [Fri, 7 Sep 2001 04:21:07 +0000 (04:21 +0000)]
Error message cleanup.
Robert James Kaes [Fri, 7 Sep 2001 04:20:04 +0000 (04:20 +0000)]
Fixed up return types.
Robert James Kaes [Fri, 7 Sep 2001 04:19:05 +0000 (04:19 +0000)]
Error message cleanup.
Include locking around access to the servers_waiting variable.
Robert James Kaes [Fri, 7 Sep 2001 00:45:32 +0000 (00:45 +0000)]
Updates
Robert James Kaes [Fri, 7 Sep 2001 00:40:34 +0000 (00:40 +0000)]
Added the ability to clear out the DNS cache after a certain number of
insertions.
Robert James Kaes [Fri, 7 Sep 2001 00:38:03 +0000 (00:38 +0000)]
Fixed the ternary_destroy() function which causes segfaults.
Robert James Kaes [Thu, 6 Sep 2001 21:53:16 +0000 (21:53 +0000)]
Still need to fix a problem with tinproxy segfaulting when we try to
delete the ternary tree.
Robert James Kaes [Thu, 6 Sep 2001 21:52:31 +0000 (21:52 +0000)]
Make sure that freeptr actually points to something before we try to
invoke it.
Robert James Kaes [Thu, 6 Sep 2001 21:16:35 +0000 (21:16 +0000)]
Try moving the kill thread code into the thread_main() function so it can
check if there are too many thread after it's finished with it's request.
Needs to be cleaned up further (if this is the right idea) because of the
locking around the servers_waiting variable.
Robert James Kaes [Thu, 6 Sep 2001 19:00:47 +0000 (19:00 +0000)]
Initialzed the servers_waiting explictly. Added debugging code to find out
why the threads are not being closed.
Robert James Kaes [Tue, 4 Sep 2001 18:31:43 +0000 (18:31 +0000)]
New news. :)
Robert James Kaes [Tue, 4 Sep 2001 18:22:12 +0000 (18:22 +0000)]
More updates.
Robert James Kaes [Tue, 4 Sep 2001 18:22:00 +0000 (18:22 +0000)]
Moved the compare_header() test after the skip header test.
Robert James Kaes [Tue, 4 Sep 2001 17:53:41 +0000 (17:53 +0000)]
Switched to a case insensitive search method.
Robert James Kaes [Tue, 4 Sep 2001 16:52:04 +0000 (16:52 +0000)]
Bumped the version number.
Robert James Kaes [Tue, 4 Sep 2001 16:50:45 +0000 (16:50 +0000)]
Updates.
Robert James Kaes [Tue, 4 Sep 2001 16:50:22 +0000 (16:50 +0000)]
Fixed a format string bug with the syslog function.
Robert James Kaes [Fri, 31 Aug 2001 15:20:56 +0000 (15:20 +0000)]
Headers MUST have quotes around them.
Robert James Kaes [Thu, 30 Aug 2001 22:00:36 +0000 (22:00 +0000)]
Spelling and grammar fixes.
Robert James Kaes [Thu, 30 Aug 2001 16:58:41 +0000 (16:58 +0000)]
New information for Thursday, August 30, 2001
Robert James Kaes [Thu, 30 Aug 2001 16:54:04 +0000 (16:54 +0000)]
Another new version.
Robert James Kaes [Thu, 30 Aug 2001 16:53:36 +0000 (16:53 +0000)]
More fixes.
Robert James Kaes [Thu, 30 Aug 2001 16:52:56 +0000 (16:52 +0000)]
Removed the xstrstr() function since it is no longer used. reqs.c was the
only place it was called from, and strstr() will do the same work.
Robert James Kaes [Thu, 30 Aug 2001 16:52:09 +0000 (16:52 +0000)]
Renamed ternary_insert() to ternary_insert_replace() and added the ability
to replace existing data (without a memory leak.) Added two DEFINES
ternary_insert() and ternary_replace() to aid in coding.
Robert James Kaes [Thu, 30 Aug 2001 16:51:10 +0000 (16:51 +0000)]
Replaced the call to xstrstr() with strstr().
Robert James Kaes [Thu, 30 Aug 2001 16:50:42 +0000 (16:50 +0000)]
Removed the insert_data() function and made the LOCKing go around the
entire dnscache() function. Replaced the "replace" code in dns_insert()
with a call to ternary_replace().
Robert James Kaes [Wed, 29 Aug 2001 15:56:48 +0000 (15:56 +0000)]
New style and new information.
Robert James Kaes [Wed, 29 Aug 2001 15:29:29 +0000 (15:29 +0000)]
New minor version number.
Robert James Kaes [Wed, 29 Aug 2001 04:06:00 +0000 (04:06 +0000)]
More change logs.
Robert James Kaes [Wed, 29 Aug 2001 04:05:33 +0000 (04:05 +0000)]
Fixed a problem where the REGEX library was included even if the system
already had a working library.
Robert James Kaes [Wed, 29 Aug 2001 04:04:01 +0000 (04:04 +0000)]
Text clean up.
Robert James Kaes [Wed, 29 Aug 2001 04:01:05 +0000 (04:01 +0000)]
Removed the new_dnscache() call.
Robert James Kaes [Wed, 29 Aug 2001 04:00:22 +0000 (04:00 +0000)]
Cleaned up the locking code to make it more fine grained. Did this since
dncache.c has locking itself now.
Robert James Kaes [Wed, 29 Aug 2001 03:59:12 +0000 (03:59 +0000)]
Changed how we handle when compiled with debug code.
Robert James Kaes [Wed, 29 Aug 2001 03:58:39 +0000 (03:58 +0000)]
Removed the new_dnscache() function and the ternary.h include.
Robert James Kaes [Wed, 29 Aug 2001 03:57:51 +0000 (03:57 +0000)]
Added a more fine grained locking system for multiple threads.
Removed the new_dnscache() function and moved it into dnscache().
Fixed a memory leak in dns_insert().
Robert James Kaes [Tue, 28 Aug 2001 15:54:52 +0000 (15:54 +0000)]
Update regarding the log level problems.
Robert James Kaes [Tue, 28 Aug 2001 15:52:53 +0000 (15:52 +0000)]
New version number.
Robert James Kaes [Tue, 28 Aug 2001 15:52:40 +0000 (15:52 +0000)]
Fixed a problem in log.c
Robert James Kaes [Tue, 28 Aug 2001 15:51:58 +0000 (15:51 +0000)]
The logging levels _now_ output the correct information depending on where
the config file sets it.
Robert James Kaes [Tue, 28 Aug 2001 04:35:03 +0000 (04:35 +0000)]
More changes.
Robert James Kaes [Tue, 28 Aug 2001 04:33:54 +0000 (04:33 +0000)]
Added an extra CRNL to the end of the HTML body.
Robert James Kaes [Tue, 28 Aug 2001 04:33:21 +0000 (04:33 +0000)]
Changed the default stack size to 128 KB.
Robert James Kaes [Tue, 28 Aug 2001 04:32:14 +0000 (04:32 +0000)]
Moved the strip new line/carriage return from the end of a line into a
separate function.
Robert James Kaes [Mon, 27 Aug 2001 19:57:24 +0000 (19:57 +0000)]
Fixed a problem with the POSIX threading on FreeBSD systems.
Robert James Kaes [Mon, 27 Aug 2001 17:51:40 +0000 (17:51 +0000)]
More news of course.
Robert James Kaes [Mon, 27 Aug 2001 17:48:27 +0000 (17:48 +0000)]
Stop CVS from giving me an error.
Robert James Kaes [Mon, 27 Aug 2001 17:47:40 +0000 (17:47 +0000)]
More changes as per usual. :)
Robert James Kaes [Mon, 27 Aug 2001 17:47:25 +0000 (17:47 +0000)]
Bumped up the version number.
Added a test for FreeBSD so that it can set GCC to compile with POSIX
threading.
Robert James Kaes [Mon, 27 Aug 2001 17:46:50 +0000 (17:46 +0000)]
Changed the MIME type to text/html rather than the incorrect text/mime.
Robert James Kaes [Mon, 27 Aug 2001 17:46:20 +0000 (17:46 +0000)]
Moved some of the includes around so that FreeBSD can compile correctly.
Robert James Kaes [Mon, 27 Aug 2001 17:45:50 +0000 (17:45 +0000)]
Changed the default stack size since some OS's have a stack size which is
too small.
Robert James Kaes [Mon, 27 Aug 2001 17:44:55 +0000 (17:44 +0000)]
Fixed a problem where the connect messages were not getting logged if the
log level was set to INFO.