def testPrePathURLSSLPort(self):
d = DummyChannel()
d.transport = DummyChannel.TCP()
d.transport.port = 443
request = server.Request(d, 1)
request.setHost('example.com', 443)
request.gotLength(0)
request.requestReceived('GET', '/foo/bar', 'HTTP/1.0')
self.assertEqual(request.prePathURL(), 'http://example.com:443/foo/bar')
评论列表
文章目录