Commit Graph

163 Commits

Author SHA1 Message Date
Robert James Kaes
0e7182533c Need to check the return value of hashmap_first() since it could be
negative.
2002-04-26 16:43:20 +00:00
Robert James Kaes
6992c74bba Check to see if request->path is actually allocated before trying to free
it.
2002-04-25 19:20:56 +00:00
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
Robert James Kaes
3d9a64d54e ACL fixes. Use a better differentiation between string and numeric
addresses.
2001-11-03 06:10:08 +00:00
Robert James Kaes
4ecb6d1a3d Changes reflecting the new conns.* files and the organization of the
header files.
2001-10-25 17:39:52 +00:00
Robert James Kaes
2da1378f53 Changes to reflect the various fixes to have CONNECT upstream proxying
work.
2001-10-25 05:13:18 +00:00
Robert James Kaes
3e91392c8a More changes to reqs.c and buffer.c 2001-10-25 04:42:32 +00:00
Robert James Kaes
d090c02476 New changes to getpeer_string(). 2001-10-23 03:58:40 +00:00
Robert James Kaes
358b2781af Cleaned up the code in handle_connection() and added a NULL pointer test
in the free request function.
2001-10-22 16:08:29 +00:00
Robert James Kaes
ad743c1e41 Fixed a problem where a user's variable would be uninitialized if a DNS
lookup failed.
2001-10-22 15:56:11 +00:00
Robert James Kaes
b40e382e5a More moving around of the source code. Still can't get CONNECT to work
with an upstream proxy.
2001-10-19 18:03:49 +00:00
Robert James Kaes
26587ef1e7 Fixed a problem where a full buffer on the read side would cause the
connection to be closed.
2001-10-18 21:45:54 +00:00
Robert James Kaes
af1246c78b Added the ability to compile tinyproxy with static linking. 2001-10-01 04:01:10 +00:00
Robert James Kaes
f869dfabdf More changes, mostly related to the support for an upstream proxy. 2001-09-16 20:15:06 +00:00
Robert James Kaes
8df2fba997 More changes. 2001-09-15 21:32:24 +00:00
Robert James Kaes
13c1e97beb The biggest change is the added support for SSL. 2001-09-14 23:45:15 +00:00
Robert James Kaes
6f6730c28d Fixed a memory leak in process_method(). 2001-09-12 03:33:43 +00:00
Robert James Kaes
cbe19e29c7 More changes. These all relate to the switch from stack memory to heap
memory.
2001-09-11 19:28:00 +00:00
Robert James Kaes
1bc68cc41d Fixed a memory leak. 2001-09-11 04:14:43 +00:00
Robert James Kaes
07bcd97961 More changes. 2001-09-08 18:59:13 +00:00
Robert James Kaes
b8a694e7a3 Fixed a memory leak in thread_main(). 2001-09-08 06:29:04 +00:00
Robert James Kaes
28d955a3c8 Explictly added the DETACHED creation method on threads. 2001-09-07 18:19:39 +00:00
Robert James Kaes
2b781f537c Updates. 2001-09-07 04:21:53 +00:00
Robert James Kaes
4dd64f873e Updates 2001-09-07 00:45:32 +00:00
Robert James Kaes
11cbe6cb5b More updates. 2001-09-04 18:22:12 +00:00
Robert James Kaes
b095c7a84d Updates. 2001-09-04 16:50:45 +00:00
Robert James Kaes
2857b4be36 Spelling and grammar fixes. 2001-08-30 22:00:36 +00:00
Robert James Kaes
c825db8d56 More fixes. 2001-08-30 16:53:36 +00:00
Robert James Kaes
5584d30eed More change logs. 2001-08-29 04:06:00 +00:00
Robert James Kaes
42849c7d66 Fixed a problem in log.c 2001-08-28 15:52:40 +00:00
Robert James Kaes
4dbc4a637b More changes. 2001-08-28 04:35:03 +00:00
Robert James Kaes
f61c275395 More changes as per usual. :) 2001-08-27 17:47:40 +00:00
Robert James Kaes
194e1ad9cc New change log entries. 2001-08-27 03:46:51 +00:00
Robert James Kaes
f590a7d738 More changes. 2001-08-27 01:04:48 +00:00
Robert James Kaes
0ca3a710da Updated the Change Log 2001-08-26 23:36:18 +00:00
Robert James Kaes
d30ca6f3db Spelling fix. 2001-08-26 22:10:18 +00:00
Robert James Kaes
af2d81ed71 Updated the Change Log information. 2001-08-26 21:24:01 +00:00
Robert James Kaes
f64578eef1 Changed in configure.in 2001-06-06 19:32:23 +00:00
Robert James Kaes
56960edd72 New changelog listings... 2001-06-05 03:56:22 +00:00
Robert James Kaes
8c269c96bc Reflect the changes made to the source. 2001-06-04 23:33:52 +00:00
Robert James Kaes
93d352853b Added the change for the LogLevel directive in doc/tinyproxy.conf 2001-06-02 17:34:27 +00:00
Robert James Kaes
5afba764bb Fixed the tests for libsocket, libnsl, and libresolv. Improved the tests
for the yacc program since bison 1.25 was originally used to write the
scanner. Updated the list of headers to look for when configuring. Bumped
up the prerelease number.
2001-06-02 17:23:16 +00:00
Robert James Kaes
118f4fd9dd Fixed a problem with --with-port= configuration option. 2001-06-02 03:33:17 +00:00
Robert James Kaes
65a41578ad New version (reflects changes to add the LogLevel switch) 2001-06-02 03:11:14 +00:00
Robert James Kaes
cce7ca652c Added a test for the resolv library for the gethostby* functions. 2001-06-02 02:12:47 +00:00
Robert James Kaes
101cf497d5 Updated ChangeLog 2001-05-27 02:40:43 +00:00
Robert James Kaes
b33e41eff1 Updated the change log 2001-05-23 18:19:47 +00:00
Robert James Kaes
93b201d23b Fixed more potential overflow bugs. 2001-01-15 17:11:57 +00:00
Robert James Kaes
2f2d74e9f2 Fixed a potential security bug in http_err. There was a possibility of a
heap overflow exploit.
2001-01-15 17:06:19 +00:00
Robert James Kaes
da7a96a2e4 Updated changelog 2000-12-08 03:35:58 +00:00
Robert James Kaes
1a2b20af5b Updated Information. 2000-10-23 21:47:39 +00:00