summaryrefslogtreecommitdiffstats
path: root/mirror-failure.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:00:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:00:48 +0000
commit851b6a097165af4d51c0db01b5e05256e5006896 (patch)
tree5f7c388ec894a7806c49a99f3bdb605d0b299a7c /mirror-failure.py
parentInitial commit. (diff)
downloadapt-851b6a097165af4d51c0db01b5e05256e5006896.tar.xz
apt-851b6a097165af4d51c0db01b5e05256e5006896.zip
Adding upstream version 2.6.1.upstream/2.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mirror-failure.py')
-rw-r--r--mirror-failure.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/mirror-failure.py b/mirror-failure.py
new file mode 100644
index 0000000..e7d2bbf
--- /dev/null
+++ b/mirror-failure.py
@@ -0,0 +1,23 @@
+# File: cgihttpserver-example-1.py
+
+import CGIHTTPServer
+import BaseHTTPServer
+
+class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
+ #cgi_directories = ["/cgi"]
+ def do_POST(self):
+ print "do_POST"
+ #print self.command
+ #print self.path
+ #print self.headers
+ print self.client_address
+ data = self.rfile.read(int(self.headers["content-length"]))
+ print data
+ self.wfile.write("200 Ok\n");
+
+PORT = 8000
+
+httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler)
+print "serving at port", PORT
+httpd.serve_forever()
+