Robert James Kaes
bb9f206529
Moved the definition of the struct buffer_s into the buffer.c file and out
...
of the buffer.h file. This also required the removal of the BUFFER_SIZE
macro, and replace it with the buffer_size() function.
2002-05-14 00:43:38 +00:00
Robert James Kaes
d46cba8a0b
Added a "tail" pointer to the vector to make insertions more efficient.
2002-05-13 23:32:16 +00:00
Robert James Kaes
16e96c79e8
Thanks to Justin Guyett for making the hashmap_insert() function use a
...
constant time insert. Explanation: new enteries are added to the _front_
of the chain, rather than search to the end.
2002-05-13 20:02:23 +00:00
Robert James Kaes
73e3b495e0
Fixed up a potential SEGFAULT if memory for an entry could not be
...
allocated. Also, thanks to Justin Guyett for finding a problem the
hashmap_remove() function. There was a problem where an entry's "prev"
pointer could be pointing to freed memory.
Finally, renamed all "maps" to bucket to make the source more
understandable.
2002-05-13 18:47:46 +00:00
Robert James Kaes
f0b0990612
Fixed up the installation of the tinyproxy.conf file. The file is only
...
installed if it doesn't already exist (rather than giving a make error.)
2002-05-10 19:53:03 +00:00
Robert James Kaes
f58a34ed34
--with-config now supports absolute paths as per James Flemer's request.
2002-05-08 18:42:44 +00:00
Robert James Kaes
cf2ecb83b8
Removed the request logging in the tunnel because it breaks the tunnel
...
concept since it blocks waiting for information from the client before any
data from the remote is relayed.
2002-05-08 03:29:23 +00:00
Robert James Kaes
82f7a5cba6
Added code to figure out and install the configuration file.
2002-05-02 04:44:03 +00:00
Robert James Kaes
fefedea577
Added the reason why servers_waiting needs to be a signed integer.
2002-04-29 16:31:16 +00:00
Robert James Kaes
ed90a4676f
Added more error checking in process_client_headers() and
...
process_server_headers() functions.
Also, better reporting of errors back to the client.
2002-04-28 20:03:18 +00:00
Robert James Kaes
577f3cebbf
Fixed up the error detection code when relating the pthread functions.
...
They return 0 if OK, and a positive error code.
Cleaned up the status setting code in thread_main().
Thanks to Hans-Georg Bork for fixing the problem in thread_pool_create()
where the status wasn't set early enough to allow all the threads to be
created.
Added additional logging information to let the admin know what is
happening with the thread creation.
2002-04-28 02:37:01 +00:00
Robert James Kaes
1a8c914dd2
Changed the len type to ssize_t because we need to detect errors in the
...
recv() call. Thanks to Tom Cross for discovering this bug.
2002-04-26 19:33:09 +00:00
Robert James Kaes
e9f5b2e75f
Check the return value of hashmap_first()
2002-04-26 16:50:55 +00:00
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