161 Commits

Author SHA1 Message Date
Robert James Kaes
7fe567da94 Changed to the hashmap module, and to the remove_connection_headers()
function.
2002-04-25 18:58:55 +00:00
Robert James Kaes
c5b9ec889e Renamed the LOCKing macros and added assert debugging code. Also, moved
the mutex initialization into a function call so that I can use an
error checking mutex once I figure out how to get it to work on my
computer.
2002-04-22 19:41:17 +00:00
Robert James Kaes
c648ed1bc5 Added the "Bind" directive.
Fixed up the log_message function to store messages until the log file has
been created.
"Proxy-Connection" is not sent along to the remote message.
2002-04-22 19:37:15 +00:00
Robert James Kaes
1db154464e Removed the call to inet_aton() since the gethostbyname() function handles
the dotted-decimal case itself.
2002-04-18 21:53:33 +00:00
Robert James Kaes
60f0a86c75 The stats now wait until after the client has finished sending all its
headers before sending the HTTP response back.  This should be more
standards compliant.
2002-04-18 21:43:53 +00:00
Robert James Kaes
73a53daf38 Removed the call to hstrerror() in the getpeer_string() function. It's
not available on all machines.
2002-04-18 18:48:22 +00:00
Robert James Kaes
09c7acf9fc Memory leak in the hashmap_delete() function has been fixed. 2002-04-18 18:41:27 +00:00
Robert James Kaes
45a96fde12 Changed to vector.c and hashmap.c
Added the debugging_strdup() function.
Fixed a memory leak in get_all_headers.
2002-04-18 18:00:35 +00:00
Robert James Kaes
ce4687fbf9 Added the debuggin_strdup() function and the associated safestrdup()
macro.  Also, added asserts to the other debugging_* functions.
2002-04-18 17:49:14 +00:00
Robert James Kaes
43860d2469 Moved the filter_destroy() logic from inside the signal handler. It's now
been moved to inside the main() function.
2002-04-18 17:04:04 +00:00
Robert James Kaes
5822ec3d44 Moved the log rotation code out of the signal handler and into it's own
function.  The signal handler now simply sets a flag which is monitored
inside the thread_main_loop() function.  The log rotation code has also
been tightened to handle any error conditions better.  Credit to Petr
Lampa for suggesting that system functions inside of a signal handler is
bad magic.
2002-04-18 16:57:06 +00:00
Robert James Kaes
6a588826c1 Changes to configure.ac, src/sock.c, src/reqs.c, src/acl.c, src/acl.h,
and src/thread.c
2002-04-17 20:57:58 +00:00
Robert James Kaes
795f4f2fe7 More spelling fixes. 2002-04-16 04:58:51 +00:00
Robert James Kaes
8defcc6225 Just general spell checking. 2002-04-16 04:14:59 +00:00
Robert James Kaes
0fb2fa7393 Various changes in the src/anonymous.c and src/reqs.c files. 2002-04-16 03:22:44 +00:00
Robert James Kaes
17ea28ccc6 Changes for chomp(), read_request_line(), and readline() 2002-04-15 04:17:17 +00:00
Robert James Kaes
a5d3212751 Changed the error boolean flag into a pointer to an error string and an
error code.  We're storing this information because tinyproxy doesn't
output the error information until _after_ the client has sent it's
information.
2002-04-15 02:07:27 +00:00
Robert James Kaes
c86d22226f Added additional error handling for the bind() and listen() system calls
when setting up the listening socket.
2002-04-13 19:03:18 +00:00
Robert James Kaes
be47c1791d Modified the opensock() function to respect the Listen directive. If it's
set, bind all outgoing addresses to this local address.
2002-04-13 05:20:19 +00:00
Robert James Kaes
1685e9ca66 Changes regarding the new ConnectPort directive. 2002-04-12 17:01:07 +00:00
Robert James Kaes
f1a451faea Added a write_via_header() function which is now used in both header
processing functions.  Also, added a list of headers to drop in the
process server header functions.
2002-04-12 03:09:04 +00:00
Robert James Kaes
b18070b268 Changes to remove_connection_headers(), relay_connection(),
process_client_headers(), and process_server_headeers().

Added the get_content_length() function.
2002-04-11 20:45:10 +00:00
Robert James Kaes
ed30d9d329 Changed in src/Makefile.am 2002-04-10 21:52:07 +00:00
Robert James Kaes
448a1b222d Bumped up the pre-version release number and removed the AC_FUNC_MEMCMP
macro.
2002-04-10 19:10:07 +00:00
Robert James Kaes
fb616011ef More changes in the ChangeLog :) 2002-04-09 20:07:10 +00:00
Robert James Kaes
3c631c6e5c James Flemer cleaned up the make_netmask() function to remove the static
table.  Very nice.
2002-04-09 19:11:09 +00:00
Robert James Kaes
7e6d2bf451 New changes to configure.ac, hashmap.c, and vector.c 2002-04-09 16:32:22 +00:00
Robert James Kaes
eb78e5e1f4 Added the cancelation setting to make sure the thread stops immediately. 2002-04-09 00:37:43 +00:00
Robert James Kaes
0d66719c5a Just moved the looping code from main() into thread_main_loop(). 2002-04-08 21:35:10 +00:00
Robert James Kaes
6edba0dfa6 Updated the changelog information. 2002-04-07 21:30:30 +00:00
Robert James Kaes
daf90db115 Update to reflect changes to configure.ac 2002-04-02 17:00:29 +00:00
Robert James Kaes
1819c0f818 Added code to check for "errors" from the accept call in thread_main() and
also a new thread_kill_threads() function which should cancel all threads
when the main thread is being closed.
2002-01-25 00:01:45 +00:00
Robert James Kaes
388920bc53 Added code which checks to see if the user has signalled that tinyproxy
should be closed.
2002-01-08 02:02:25 +00:00
Robert James Kaes
a0dee6c57f Check for errors returned by the accept() function. 2001-12-28 22:29:11 +00:00
Robert James Kaes
8cfe33fc4a more changes to utils.c, reqs.c, and sock.c 2001-12-24 00:03:00 +00:00
Robert James Kaes
831b00dc7a Made the error message regarding the Idle timeout more verbose, and
changed the level to WARNING.
2001-12-23 22:00:36 +00:00
Robert James Kaes
c3124815a1 Cleaned up the code which sends the "Via" header. It now uses
write_message().
2001-12-23 21:55:08 +00:00
Robert James Kaes
4ed73b6f07 Fixed up the order of some of the includes to cope with OpenBSD. Also,
test for the MSG_NOSIGNAL define.
2001-12-23 03:28:03 +00:00
Robert James Kaes
63a1fa96cc Removed duplicate code from process_server_headers() and removed the calls
to strlen(); readline() already returns the length of the string, so use
that instead.
2001-12-19 20:40:23 +00:00
Robert James Kaes
4a257edd0a Update the reqs.c file. 2001-12-19 05:10:46 +00:00
Robert James Kaes
a62834808a Added the code the log the request when in tunnelling mode. 2001-12-17 19:10:37 +00:00
Robert James Kaes
15a7581e30 Updated the changelog. 2001-12-17 00:12:15 +00:00
Robert James Kaes
70970e832a Updates for safe_write() and anonymous section. 2001-12-15 20:01:42 +00:00
Robert James Kaes
e10d005f81 Added the lookup_domain() function which replaces the DNS caching system. 2001-12-15 06:00:03 +00:00
Robert James Kaes
7c4569624d Updates relating to the fixes to buffering code in read_buffer(). 2001-11-26 01:31:26 +00:00
Robert James Kaes
b0748328d7 More changes. 2001-11-25 22:03:52 +00:00
Robert James Kaes
c8b2c614f9 More updates. 2001-11-25 02:20:00 +00:00
Robert James Kaes
bcb54a8a67 Changes relating to chomp() 2001-11-23 01:11:58 +00:00
Robert James Kaes
bcb7c68911 Updated readline() function. 2001-11-22 00:20:53 +00:00
Robert James Kaes
270af08171 Removed the buffer_size() function and turned it into BUFFER_SIZE() macro.
Moved the struct buffer_s into the header file. Added more assert() calls
to better document the assumptions the functions make. Removed incorrect
code in remove_from_buffer() which was never actually called anyway.
2001-11-05 15:23:05 +00:00