[Inteproxy-commits] r146 - in trunk: . inteproxy
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jun 13 14:03:13 CEST 2008
Author: bh
Date: 2008-06-13 14:03:12 +0200 (Fri, 13 Jun 2008)
New Revision: 146
Modified:
trunk/ChangeLog
trunk/inteproxy/main.py
trunk/inteproxy/proxycore.py
Log:
Remove support for the SHUTDOWN HTTP Method. It was inherited
from an earlier project where it was used by test cases, but it
was never used in InteProxy.
* inteproxy/main.py (run_server): Remove support for the
--allow-shutdown command line argument
* inteproxy/proxycore.py (InteProxyHTTPRequestHandler.do_SHUTDOWN)
(InteProxyHTTPRequestHandler.allow_shutdown): Removed.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-13 10:55:18 UTC (rev 145)
+++ trunk/ChangeLog 2008-06-13 12:03:12 UTC (rev 146)
@@ -1,5 +1,17 @@
2008-06-13 Bernhard Herzog <bh at intevation.de>
+ Remove support for the SHUTDOWN HTTP Method. It was inherited
+ from an earlier project where it was used by test cases, but it
+ was never used in InteProxy.
+
+ * inteproxy/main.py (run_server): Remove support for the
+ --allow-shutdown command line argument
+
+ * inteproxy/proxycore.py (InteProxyHTTPRequestHandler.do_SHUTDOWN)
+ (InteProxyHTTPRequestHandler.allow_shutdown): Removed.
+
+2008-06-13 Bernhard Herzog <bh at intevation.de>
+
* inteproxy/main.py (run_server): Add command line options
--rewrite-urls to turn on url rewriting
Modified: trunk/inteproxy/main.py
===================================================================
--- trunk/inteproxy/main.py 2008-06-13 10:55:18 UTC (rev 145)
+++ trunk/inteproxy/main.py 2008-06-13 12:03:12 UTC (rev 146)
@@ -95,7 +95,6 @@
parser.set_defaults(port=64609, workers=5, debug_level=0,
config_file=default_config_file)
parser.add_option("--logfile")
- parser.add_option("--allow-shutdown", action="store_true")
parser.add_option("--port", type="int")
parser.add_option("--workers", type="int")
parser.add_option("--debug-level", type="int")
@@ -103,7 +102,6 @@
parser.add_option("--config-file")
opts, rest = parser.parse_args()
- HandlerClass.allow_shutdown = opts.allow_shutdown
HandlerClass.debug_level = opts.debug_level
transcoder_map = inteproxy.transcoder.create_transcoder_map()
Modified: trunk/inteproxy/proxycore.py
===================================================================
--- trunk/inteproxy/proxycore.py 2008-06-13 10:55:18 UTC (rev 145)
+++ trunk/inteproxy/proxycore.py 2008-06-13 12:03:12 UTC (rev 146)
@@ -34,9 +34,6 @@
return s
class InteProxyHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
- # Whether the SHUTDOWN method is allowed. If allowed, anybody who can
- # connect to the server can shutdown the server.
- allow_shutdown = False
# Whether debug output should be logged. Supported values:
# 0 no debug output
@@ -46,23 +43,6 @@
#
debug_level = 0
- def do_SHUTDOWN(self):
- """Shutdown the server if self.allow_shutdown is True (default False).
-
- To shutdown the server, this method calls the server's
- server_close method.
- """
- if self.allow_shutdown:
- self.server.server_close()
- self.send_response(200)
- # somewhat ugly hack: connect to this server, to unblock the
- # accept call.
- s = socket.socket(socket.AF_INET)
- s.connect(("localhost", self.server.server_port))
- s.close()
- else:
- self.send_error(400)
-
def do_GET(self):
"""Handle a GET request"""
self.handle_proxy_request()
More information about the Inteproxy-commits
mailing list