[devscripts] 08/12: server-head.py: add HEADER logging server
Osamu Aoki
osamu at moszumanska.debian.org
Wed Sep 23 16:43:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
osamu pushed a commit to branch multitar
in repository devscripts.
commit ab49e3b4315b3d6dbeeb23d9e8b475c2afe275f8
Author: Osamu Aoki <osamu at debian.org>
Date: Wed Sep 16 04:33:27 2015 +0000
server-head.py: add HEADER logging server
Related to
https://bugs.debian.org/549178
[uscan] please add a user-agent option to opts=
---
test/uscan/server-head.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/test/uscan/server-head.py b/test/uscan/server-head.py
new file mode 100644
index 0000000..3d1c796
--- /dev/null
+++ b/test/uscan/server-head.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+import BaseHTTPServer
+import SimpleHTTPServer
+import logging
+
+class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
+ def do_GET(self):
+ logging.error(self.headers)
+ SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
+
+def test():
+ Handler = GetHandler
+ httpd = BaseHTTPServer.HTTPServer(('', 0), Handler)
+
+ sa = httpd.socket.getsockname()
+ with open('port', 'w') as f:
+ f.write(str(sa[1]))
+
+ httpd.serve_forever()
+
+if __name__ == '__main__':
+ test()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list