Commit Graph

  • 1bbf32f04c Fixed the problems with sending/not sending headers so that the CONNECT (SSL) method would work with upstream proxying! Robert James Kaes 2001-10-25 05:12:46 +00:00
  • 28b4477f48 Added the upstream flag to the conn_s structure. Robert James Kaes 2001-10-25 05:10:57 +00:00
  • 5f8ee4fae3 Bit of source code clean up. Robert James Kaes 2001-10-25 05:10:32 +00:00
  • 3e91392c8a More changes to reqs.c and buffer.c Robert James Kaes 2001-10-25 04:42:32 +00:00
  • 6afa56ba09 Changed the way relay_connection() works by having the both buffers emptied when either socket is closed. This should be better for the tunnel connections. Change the connect_to_upstream() function to better utilize the establish_http_connection() function. Code re-use is cool. :) Robert James Kaes 2001-10-25 04:40:48 +00:00
  • f8d43bd423 Lowered the size of the read buffer to 2K since Ethernet seems to work with 1400 byte segments. Robert James Kaes 2001-10-25 04:39:10 +00:00
  • b7b4d08758 Error message cleanup to make the information more informative. Robert James Kaes 2001-10-24 00:37:23 +00:00
  • 7d7958b0d7 Fixed a spelling problem in a log message. Robert James Kaes 2001-10-23 16:43:08 +00:00
  • 98ffd0a3fe Update to reflect the current maintainer (Robert) again. Robert James Kaes 2001-10-23 15:46:43 +00:00
  • d090c02476 New changes to getpeer_string(). Robert James Kaes 2001-10-23 03:58:40 +00:00
  • a746b9d0b2 Moved the zero-length string setting to outside the tests in getpeer_*() functions. Also added a more robust error reporting for DNS errors. Robert James Kaes 2001-10-23 03:57:34 +00:00
  • 56a9766529 Hopefully cleaned up the source a bit. Robert James Kaes 2001-10-23 03:55:39 +00:00
  • 1abc300112 Cleaned up the file and added the request for a more consistent error system. Robert James Kaes 2001-10-23 03:55:01 +00:00
  • 445decf6a8 This commit was manufactured by cvs2svn to create tag 'rel_1-4-3_pre6'. 1.4.3pre6 cvs2svn 2001-10-22 21:30:19 +00:00
  • ce8b94bd73 Bumped the version number. Robert James Kaes 2001-10-22 21:30:18 +00:00
  • db1ccab0bc New TODO entry for handling potential security problems. Robert James Kaes 2001-10-22 18:31:44 +00:00
  • a6a026cb9e Changed the getpeer_*() functions to return the reason why the name or IP address could not be looked up. Robert James Kaes 2001-10-22 16:52:34 +00:00
  • 358b2781af Cleaned up the code in handle_connection() and added a NULL pointer test in the free request function. Robert James Kaes 2001-10-22 16:08:29 +00:00
  • ad743c1e41 Fixed a problem where a user's variable would be uninitialized if a DNS lookup failed. Robert James Kaes 2001-10-22 15:56:11 +00:00
  • b40e382e5a More moving around of the source code. Still can't get CONNECT to work with an upstream proxy. Robert James Kaes 2001-10-19 18:03:49 +00:00
  • 26587ef1e7 Fixed a problem where a full buffer on the read side would cause the connection to be closed. Robert James Kaes 2001-10-18 21:45:54 +00:00
  • ac111ee8c6 Added netinet/in.h so that tinyproxy will compile on OpenBSD. Robert James Kaes 2001-10-18 03:44:06 +00:00
  • 7a613287ee Trying to allow CONNECT methods through an Upstream proxy. Robert James Kaes 2001-10-17 04:15:35 +00:00
  • af1246c78b Added the ability to compile tinyproxy with static linking. Robert James Kaes 2001-10-01 04:01:10 +00:00
  • 7c6cc24b1d Did a couple of TODOs and added a few new ones. :) Robert James Kaes 2001-09-28 20:38:07 +00:00
  • f869dfabdf More changes, mostly related to the support for an upstream proxy. Robert James Kaes 2001-09-16 20:15:06 +00:00
  • 6ab7ebcb31 send_http_message() doesn't create a memory block and store it in the connection's output_message variable. Instead the error is sent to the client right away. Once we finish processing the client's headers it will automatically accept the error message. So we get the same result, but less memory is used. Robert James Kaes 2001-09-16 20:13:52 +00:00
  • 606c8196a0 Added the configure variables to support the upstream proxy. Robert James Kaes 2001-09-16 20:12:29 +00:00
  • 490754594e Added a check to make sure the Upstream and Tunnel directives are not both set in the configuration file. Robert James Kaes 2001-09-16 20:11:54 +00:00
  • 2a566d194d Fixed a spelling mistake. Robert James Kaes 2001-09-16 20:11:24 +00:00
  • b9c4c480d2 Moved the safe_write() and safe_read() functions here. Robert James Kaes 2001-09-16 20:11:07 +00:00
  • 08baf6b01b Moved the safe_read() and safe_write() functions into the sock.c file since they're now used in other places. Robert James Kaes 2001-09-16 20:10:19 +00:00
  • a8f0272ace Added the token for Upstream and the code the handle the upstream directive in the configuration file. Robert James Kaes 2001-09-16 20:08:24 +00:00
  • ec9068fae8 Added the example for the upstream proxy directive. Robert James Kaes 2001-09-16 20:07:50 +00:00
  • 4e2b0d5b83 Added a configure option for upstream proxy support. Bumped the version number. Robert James Kaes 2001-09-16 20:07:24 +00:00
  • 319a1c65b1 Added upstream proxy support. Robert James Kaes 2001-09-16 20:06:51 +00:00
  • 4619035cd2 Fixed a problem where log messages could be missed during a rotate. Robert James Kaes 2001-09-16 05:38:27 +00:00
  • 8df2fba997 More changes. Robert James Kaes 2001-09-15 21:32:24 +00:00
  • 9860222979 Added the send_http_message() function to handle sending messages back to the client. It's used by httperr() and showstats(). Robert James Kaes 2001-09-15 21:29:59 +00:00
  • d3213f193c 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 2001-09-15 21:29:22 +00:00
  • d2ddca583e Removed the memory allocation log messages. Robert James Kaes 2001-09-15 21:28:25 +00:00
  • 7615024f27 Changed to using the send_http_message() function so that the HTTP headers are sent properly. Robert James Kaes 2001-09-15 21:27:58 +00:00
  • b7fc58333b 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 2001-09-15 21:26:14 +00:00
  • 1c8dcecf82 Removed the log message when unable to allocate memory. Robert James Kaes 2001-09-15 21:24:18 +00:00
  • 48ddb827a7 Updated the authorization string. Robert James Kaes 2001-09-15 21:21:01 +00:00
  • 13c1e97beb The biggest change is the added support for SSL. Robert James Kaes 2001-09-14 23:45:15 +00:00
  • 0689226ba6 Bumped up version number. Robert James Kaes 2001-09-14 23:44:47 +00:00
  • 9d61e1fd4b Removed these files since their functionality has been replaced. Robert James Kaes 2001-09-14 23:43:59 +00:00
  • ea4d707d12 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 2001-09-14 21:16:56 +00:00
  • 9c520c7a50 Changed the buffer pointer in safe_write() to be const void* since we're not changing the values. Robert James Kaes 2001-09-14 19:50:45 +00:00
  • dab361f764 When logging an error indicate the file descriptor and the error number. Robert James Kaes 2001-09-14 19:49:10 +00:00
  • 7bfb5527ff Include the SSL field in the connection structure since we're going to handle SSL connections. Robert James Kaes 2001-09-14 04:56:58 +00:00
  • c6d2e0f7ff 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 2001-09-14 04:56:29 +00:00
  • bce9e6601e Removed the reference to uri.c and uri.h since the new reqs.c doesn't use them. Robert James Kaes 2001-09-14 04:55:06 +00:00
  • 6f6730c28d Fixed a memory leak in process_method(). Robert James Kaes 2001-09-12 03:33:43 +00:00
  • c48aea165d Fixed memory leak. Robert James Kaes 2001-09-12 03:33:15 +00:00
  • 25457361c7 Changed mallocs to callocs. Robert James Kaes 2001-09-12 03:32:54 +00:00
  • ac4bbe6bd6 Increased the number of "insertions" before the free memory. Robert James Kaes 2001-09-12 03:32:24 +00:00
  • cbe19e29c7 More changes. These all relate to the switch from stack memory to heap memory. Robert James Kaes 2001-09-11 19:28:00 +00:00
  • e2f10bc2ea Added the debugging realloc() function. Robert James Kaes 2001-09-11 19:27:27 +00:00
  • 2c3cc9185d Set the stack size of threads to 32KB from 128KB. Robert James Kaes 2001-09-11 19:27:09 +00:00
  • f8edd2d8b4 Switched the memory allocation for the large strings to heap based instead of stack based. Robert James Kaes 2001-09-11 19:26:49 +00:00
  • 5dd98ac658 Bumped up the preversion number Robert James Kaes 2001-09-11 19:24:44 +00:00
  • 8aca9455b2 Style stuff. Robert James Kaes 2001-09-11 04:38:23 +00:00
  • 04ea116e8e Updated version number. Robert James Kaes 2001-09-11 04:21:18 +00:00
  • 1bc68cc41d Fixed a memory leak. Robert James Kaes 2001-09-11 04:14:43 +00:00
  • 365df5b5be Used safecalloc() instead of malloc() and memset(). Fixed a potential memory leak with the regular expression engine. Robert James Kaes 2001-09-11 04:13:58 +00:00
  • c04ffd3913 Comment cleanup. Robert James Kaes 2001-09-11 04:12:47 +00:00
  • 07bcd97961 More changes. Robert James Kaes 2001-09-08 18:59:13 +00:00
  • 80fc4a8b94 New pre version Robert James Kaes 2001-09-08 18:58:57 +00:00
  • 0668e42e8f Changed all the mallocs and callocs to use the new safemalloc and safecalloc. Robert James Kaes 2001-09-08 18:58:37 +00:00
  • d5253ec5f4 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 2001-09-08 18:58:02 +00:00
  • 78bc90cd07 Lowered the number of insertions before the ternary tree is rebuilt. Robert James Kaes 2001-09-08 18:56:30 +00:00
  • 4923dd22a7 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 2001-09-08 18:55:58 +00:00
  • b8a694e7a3 Fixed a memory leak in thread_main(). Robert James Kaes 2001-09-08 06:29:04 +00:00
  • 28d955a3c8 Explictly added the DETACHED creation method on threads. Robert James Kaes 2001-09-07 18:19:39 +00:00
  • 2b781f537c Updates. Robert James Kaes 2001-09-07 04:21:53 +00:00
  • 1a9dc4e7e8 Error message cleanup. Robert James Kaes 2001-09-07 04:21:07 +00:00
  • f5b9bdb93d Fixed up return types. Robert James Kaes 2001-09-07 04:20:04 +00:00
  • ea1309bf73 Error message cleanup. Include locking around access to the servers_waiting variable. Robert James Kaes 2001-09-07 04:19:05 +00:00
  • 4dd64f873e Updates Robert James Kaes 2001-09-07 00:45:32 +00:00
  • aa9e05430a Added the ability to clear out the DNS cache after a certain number of insertions. Robert James Kaes 2001-09-07 00:40:34 +00:00
  • c24cace1d1 Fixed the ternary_destroy() function which causes segfaults. Robert James Kaes 2001-09-07 00:38:03 +00:00
  • 32ce57a6f6 Still need to fix a problem with tinproxy segfaulting when we try to delete the ternary tree. Robert James Kaes 2001-09-06 21:53:16 +00:00
  • 4670eb5194 Make sure that freeptr actually points to something before we try to invoke it. Robert James Kaes 2001-09-06 21:52:31 +00:00
  • f2312262c7 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 2001-09-06 21:16:35 +00:00
  • 445aaca53e Initialzed the servers_waiting explictly. Added debugging code to find out why the threads are not being closed. Robert James Kaes 2001-09-06 19:00:47 +00:00
  • 7b09d88a75 This commit was manufactured by cvs2svn to create tag 'rel_1-4-2-2'. 1.4.2.2 cvs2svn 2001-09-04 18:31:44 +00:00
  • 05cc60042e New news. :) Robert James Kaes 2001-09-04 18:31:43 +00:00
  • 11cbe6cb5b More updates. Robert James Kaes 2001-09-04 18:22:12 +00:00
  • c937858ec1 Moved the compare_header() test after the skip header test. Robert James Kaes 2001-09-04 18:22:00 +00:00
  • 667b9d5d53 Switched to a case insensitive search method. Robert James Kaes 2001-09-04 17:53:41 +00:00
  • 0094d2755b Bumped the version number. Robert James Kaes 2001-09-04 16:52:04 +00:00
  • b095c7a84d Updates. Robert James Kaes 2001-09-04 16:50:45 +00:00
  • 45a021a18b Fixed a format string bug with the syslog function. Robert James Kaes 2001-09-04 16:50:22 +00:00
  • aac5f60602 Headers MUST have quotes around them. Robert James Kaes 2001-08-31 15:20:56 +00:00
  • 2857b4be36 Spelling and grammar fixes. Robert James Kaes 2001-08-30 22:00:36 +00:00
  • 4202928d35 This commit was manufactured by cvs2svn to create tag 'rel_1-4-2-1'. 1.4.2.1 cvs2svn 2001-08-30 16:58:42 +00:00
  • 2577811738 New information for Thursday, August 30, 2001 Robert James Kaes 2001-08-30 16:58:41 +00:00
  • 66012c4e8e Another new version. Robert James Kaes 2001-08-30 16:54:04 +00:00