Commit c44ab168 authored by Łukasz Nowak's avatar Łukasz Nowak

Resuse buildout provided handler.

parent 03856db8
...@@ -553,14 +553,9 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler): ...@@ -553,14 +553,9 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
if self.__server.__log: if self.__server.__log:
print '%s %s %s' % (self.command, code, self.path) print '%s %s %s' % (self.command, code, self.path)
class NCHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): class NCHandler(Handler):
def do_GET(self):
if '__stop__' in self.path:
raise SystemExit
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
def do_PUT(self): def do_PUT(self):
path = self.translate_path(self.path) path = os.path.abspath(os.path.join(self.tree, *self.path.split('/')))
d = os.path.dirname(path) d = os.path.dirname(path)
if not os.path.exists(d): if not os.path.exists(d):
os.makedirs(d) os.makedirs(d)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment