Compare commits

..
6 Commits
6 changed files with 69 additions and 63 deletions

No files matched your search

+8
View File
@@ -1,3 +1,11 @@
2002-04-08 Robert James Kaes <rjkaes@flarenet.com>
* src/thread.c (thread_main_loop): Moved the looping code into
this function from the main() function. Just a bit of clean up.
(thread_main): Changed the default cancelation point to
asynchronous, which means immediately. This should fix up the
problem where the threads would not free correctly.
2002-04-07 Robert James Kaes <rjkaes@flarenet.com> 2002-04-07 Robert James Kaes <rjkaes@flarenet.com>
* src/hashmap.c: * src/hashmap.c:
+16 -29
View File
@@ -2,34 +2,21 @@
NEWS NEWS
==== ====
There are a few problems with this version of tinyproxy, but I'm hoping It's been a few months since I release the 1.4.3 version. That's
the benefits outweigh the negative. For some reason tinyproxy is not a bit longer than I want to take with this release (which I originally
able to handle requests to *.x10.com sites. (As someone mentioned: "maybe thought would be released a week after the 1.4.3 release in November
this is a feature?" :) There also seem to be a few other random sites 21, 2001 :), but my real life kind of intruded on the project.
where tinyproxy is not communicating with the server correctly. If you Anyway, this release doesn't add any new features or functions; it's
find any such sites, let me know so I can add it to the list of domains basically a bug fix and standard compliance release. A few
where tinyproxy is failing. I'll need this information for the regression portability bugs have been fixed, and I've rewritten a few request
tests I plan on performing on the next release. processing functions to make them more compliant with the HTTP
standard.
As for the next release (1.5.0), I will not be adding new features. Now, I've tested the request related code personally with all the
tinyproxy doesn't currently conform correctly to either the HTTP/1.0 configurations I can think of, but I can't claim that it will work
or the HTTP/1.1 standards. The goal of the 1.5 release therefore is perfectly with _every_ configuration and _every_ site. So, please
to achieve standards compliance with at least HTTP/1.0. If you have give these pre-releases a thorough testing and let me know if there
looked at the tinyproxy code you will have noticed that all the real any problems you've noticed.
work of the proxy is performed in the reqs.c file. Therefore, other
than bug fixes in the other files, only reqs.c should be changed in
the 1.5.0 release. Basically, I'm hoping to just gut and replace the
reqs.c file with a standards compliant version and release a new version.
Depending on my schedule I should have the new version ready for Robert James Kaes
pre-testing sometime next week. If you have any suggestions for improving April 8, 2002
tinyproxy please let me know, but I will not be incorporating them until
1.6 (which _hopefully_ should come out fairly quickly after 1.5 has
stabilised.)
"Thank you" go out to all who have helped find bugs in the 1.4.3
candidates. You know who you are, and if you don't look in the ChangeLog
for your name. :)
Robert James Kaes
November 21, 2001
+12 -11
View File
@@ -2,17 +2,18 @@
DESCRIPTION DESCRIPTION
----------- -----------
tinyproxy is a small, efficient HTTP proxy daemon released under the tinyproxy is a small, efficient HTTP/SSL proxy daemon released under
GNU General Public Licence (GPL). tinyproxy is very useful in a small the GNU General Public Licence (GPL). tinyproxy is very useful in a
network setting, where a larger proxy like Squid would either be too small network setting, where a larger proxy like Squid would either
resource intensive, or a security risk. One of the key features of be too resource intensive, or a security risk. One of the key
tinyproxy is the buffering connection concept. In effect, tinyproxy features of tinyproxy is the buffering connection concept. In
will buffer a high speed response from a server, and then relay it to effect, tinyproxy will buffer a high speed response from a server,
a client at the highest speed the client will accept. This feature and then relay it to a client at the highest speed the client will
greatly reduces the problems with sluggishness on the Internet. If you accept. This feature greatly reduces the problems with sluggishness
are sharing an Internet connection with a small network, and you only on the Internet. If you are sharing an Internet connection with a
want to allow HTTP requests to be allowed, then tinyproxy is a great small network, and you only want to allow HTTP requests to be
tool for the network administrator. allowed, then tinyproxy is a great tool for the network
administrator.
INSTALLATION INSTALLATION
+2 -2
View File
@@ -1,4 +1,4 @@
dnl $Id: configure.ac,v 2.7 2002-04-07 21:31:15 rjkaes Exp $ dnl $Id: configure.ac,v 2.8 2002-04-09 01:45:37 rjkaes Exp $
dnl Devlopers, please strive to achieve this order: dnl Devlopers, please strive to achieve this order:
dnl dnl
@@ -14,7 +14,7 @@ dnl 8. System services
dnl dnl
dnl Read the Autoconf manual for details. dnl Read the Autoconf manual for details.
AC_INIT([tinyproxy], [1.4.4pre1], [rjkaes@users.sourceforge.net]) AC_INIT([tinyproxy], [1.5.0pre1], [rjkaes@users.sourceforge.net])
AC_CONFIG_SRCDIR([src/tinyproxy.c]) AC_CONFIG_SRCDIR([src/tinyproxy.c])
AC_PREREQ(2.52) AC_PREREQ(2.52)
+28 -16
View File
@@ -1,4 +1,4 @@
/* $Id: thread.c,v 1.21 2002-01-25 00:01:45 rjkaes Exp $ /* $Id: thread.c,v 1.23 2002-04-09 00:37:43 rjkaes Exp $
* *
* Handles the creation/destruction of the various threads required for * Handles the creation/destruction of the various threads required for
* processing incoming connections. * processing incoming connections.
@@ -118,6 +118,9 @@ thread_main(void *arg)
socklen_t clilen; socklen_t clilen;
struct thread_s *ptr; struct thread_s *ptr;
/* Set the cancelation type to immediate. */
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
ptr = (struct thread_s *) arg; ptr = (struct thread_s *) arg;
cliaddr = safemalloc(addrlen); cliaddr = safemalloc(addrlen);
@@ -272,28 +275,37 @@ thread_main_loop(void)
{ {
int i; int i;
/* If there are not enough spare servers, create more */ while (1) {
SERVER_LOCK(); if (config.quit)
if (servers_waiting < thread_config.minspareservers) { return;
SERVER_UNLOCK();
for (i = 0; i < thread_config.maxclients; i++) { /* If there are not enough spare servers, create more */
if (thread_ptr[i].status == T_EMPTY) { SERVER_LOCK();
pthread_create(&thread_ptr[i].tid, &thread_attr, if (servers_waiting < thread_config.minspareservers) {
&thread_main, &thread_ptr[i]); SERVER_UNLOCK();
thread_ptr[i].status = T_WAITING;
thread_ptr[i].connects = 0;
SERVER_INC(); for (i = 0; i < thread_config.maxclients; i++) {
if (thread_ptr[i].status == T_EMPTY) {
pthread_create(&thread_ptr[i].tid,
&thread_attr,
&thread_main,
&thread_ptr[i]);
thread_ptr[i].status = T_WAITING;
thread_ptr[i].connects = 0;
log_message(LOG_NOTICE, SERVER_INC();
"Waiting servers is less than MinSpareServers. Creating new thread.");
break; log_message(LOG_NOTICE,
"Waiting servers is less than MinSpareServers. Creating new thread.");
break;
}
} }
} }
SERVER_UNLOCK();
sleep(5);
} }
SERVER_UNLOCK();
} }
/* /*
+3 -5
View File
@@ -1,4 +1,4 @@
/* $Id: tinyproxy.c,v 1.23 2002-04-07 21:36:39 rjkaes Exp $ /* $Id: tinyproxy.c,v 1.24 2002-04-08 21:35:10 rjkaes Exp $
* *
* The initialise routine. Basically sets up all the initial stuff (logfile, * The initialise routine. Basically sets up all the initial stuff (logfile,
* listening socket, config options, etc.) and then sits there and loops * listening socket, config options, etc.) and then sits there and loops
@@ -426,10 +426,8 @@ main(int argc, char **argv)
* Start the main loop. * Start the main loop.
*/ */
log_message(LOG_INFO, "Starting main loop. Accepting connections."); log_message(LOG_INFO, "Starting main loop. Accepting connections.");
do {
thread_main_loop(); thread_main_loop();
sleep(1);
} while (!config.quit);
log_message(LOG_INFO, "Shutting down."); log_message(LOG_INFO, "Shutting down.");