MCPcopy Create free account
hub / github.com/apache/httpd / test_proxy_01_003

Method test_proxy_01_003

test/modules/proxy/test_01_http.py:76–96  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

74 assert r.json['host'] == seen
75
76 def test_proxy_01_003(self, env):
77 domain = f"test1.{env.http_tld}"
78 conf = HttpdConf(env)
79 conf.add([
80 "ProxyPreserveHost on",
81 "<Proxy balancer://backends>",
82 f" BalancerMember https://localhost:{env.https_port}",
83 " SSLProxyEngine on",
84 "</Proxy>",
85 ])
86 conf.start_vhost(domains=[domain], port=env.https_port, doc_root="htdocs/test1")
87 conf.add([
88 "ProxyPass /proxy balancer://backends",
89 "ProxyPassReverse /proxy balancer://backends",
90 ])
91 conf.end_vhost()
92 conf.install()
93 assert env.apache_restart() == 0
94 r = env.curl_get(f"https://{domain}:{env.https_port}/proxy/alive.json", 5)
95 assert r.response["status"] == 200
96 assert r.json['host'] == "test1"

Callers

nothing calls this directly

Calls 7

addMethod · 0.95
start_vhostMethod · 0.95
end_vhostMethod · 0.95
installMethod · 0.95
HttpdConfClass · 0.90
apache_restartMethod · 0.80
curl_getMethod · 0.80

Tested by

no test coverage detected