Home | History | Annotate | Download | only in test

Lines Matching refs:http

6 import http.server
25 # Loopback http server infrastructure
27 class LoopbackHttpServer(http.server.HTTPServer):
28 """HTTP server w/ a few modifications that make it useful for
33 http.server.HTTPServer.__init__(self,
54 """Stoppable thread that runs a loopback http server."""
60 request_handler.protocol_version = "HTTP/1.0"
157 """Performs digest authentication on the given HTTP request
201 class BasicAuthHandler(http.server.BaseHTTPRequestHandler):
211 http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
245 class FakeProxyHandler(http.server.BaseHTTPRequestHandler):
256 http.server.BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
265 self.path, "http")
291 self.server_url = 'http://127.0.0.1:%s' % self.server.port
319 URL = "http://localhost"
346 proxy_url = "http://127.0.0.1:%d" % self.server.port
347 handler = urllib.request.ProxyHandler({"http" : proxy_url})
398 class FakeHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
503 (302, [("Location", "http://localhost:%(port)s/somewhere_else")],
509 data = self.urlopen("http://localhost:%s/" % handler.port)
524 data = self.urlopen("http://localhost:%s/" % handler.port)
532 self.urlopen("http://localhost:%s/weeble" % handler.port)
545 data = self.urlopen("http://localhost:%s/bizarre" % handler.port)
552 data = self.urlopen("http://localhost:%s/bizarre" % handler.port,
606 req = urllib.request.Request("http://localhost:%s/" % handler.port,
614 open_url = urllib.request.urlopen("http://localhost:%s" % handler.port)
626 "http://localhost:%s" % handler.port)
637 open_url = urllib.request.urlopen("http://localhost:%s" % handler.port)
640 self.assertEqual(url, "http://localhost:%s" % handler.port)
645 data = urllib.request.urlopen("http://localhost:%s" % handler.port)
653 data = urllib.request.urlopen("http://localhost:%s" % handler.port)