]> git.saurik.com Git - apt.git/blame_incremental - mirror-failure.py
delay progress until Release files are downloaded
[apt.git] / mirror-failure.py
... / ...
CommitLineData
1# File: cgihttpserver-example-1.py
2
3import CGIHTTPServer
4import BaseHTTPServer
5
6class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
7 #cgi_directories = ["/cgi"]
8 def do_POST(self):
9 print "do_POST"
10 #print self.command
11 #print self.path
12 #print self.headers
13 print self.client_address
14 data = self.rfile.read(int(self.headers["content-length"]))
15 print data
16 self.wfile.write("200 Ok\n");
17
18PORT = 8000
19
20httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler)
21print "serving at port", PORT
22httpd.serve_forever()
23