Simplify netlib and improve API.

This commit is contained in:
Aldo Cortesi
2012-06-16 13:53:24 +12:00
parent 4e53f1ee90
commit 18a03c063e
2 changed files with 21 additions and 20 deletions

View File

@@ -12,12 +12,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
A simple proxy server implementation, which always reads all of a server
response into memory, performs some transformation, and then writes it back
to the client.
"""
import sys, os, string, socket, time
import shutil, tempfile, threading
import optparse, SocketServer
@@ -535,8 +529,7 @@ class ProxyServer(netlib.TCPServer):
def handle_connection(self, request, client_address):
ProxyHandler(self.config, request, client_address, self, self.masterq)
def shutdown(self):
netlib.TCPServer.shutdown(self)
def handle_shutdown(self):
try:
shutil.rmtree(self.certdir)
except OSError: