]> git.saurik.com Git - apt.git/blame - mirror-failure.py
Merge commit 'e2073b0276226b625897ef475f225bf8f508719e' as 'triehash'
[apt.git] / mirror-failure.py
CommitLineData
2769f0bc
MV
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