You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/01/19 18:24:07 UTC
[GitHub] [trafficserver] ywkaras commented on a change in pull request #7262: Make TSUrlSchemeGet() return scheme implied by URL type when there is no explicit scheme.
ywkaras commented on a change in pull request #7262:
URL: https://github.com/apache/trafficserver/pull/7262#discussion_r560390309
##########
File path: tests/gold_tests/pluginTest/tsapi/tsapi.test.py
##########
@@ -47,45 +52,50 @@
'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name.
'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir),
'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir),
- 'proxy.config.url_remap.remap_required': 0,
- 'proxy.config.diags.debug.enabled': 0,
+ 'proxy.config.url_remap.remap_required': 1,
+ 'proxy.config.diags.debug.enabled': 1,
'proxy.config.diags.debug.tags': 'http|test_tsapi',
})
ts.Disk.ssl_multicert_config.AddLine(
'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
)
+rp = os.path.join(Test.TestDirectory, '.libs', 'test_tsapi.so')
+
ts.Disk.remap_config.AddLine(
- "map http://myhost.test:{0} http://127.0.0.1:{0}".format(server.Variables.Port)
+ "map http://myhost.test http://127.0.0.1:{0} @plugin={1} @plugin={1}".format(server.Variables.Port, rp)
)
ts.Disk.remap_config.AddLine(
- "map https://myhost.test:{0} http://127.0.0.1:{0}".format(server.Variables.Port)
+ "map https://myhost.test:123 http://127.0.0.1:{0} @plugin={1} @plugin={1}".format(server.Variables.Port, rp)
)
-Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'test_tsapi.so'), ts)
-
tr = Test.AddTestRun()
# Probe server port to check if ready.
tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port))
tr.Processes.Default.StartBefore(Test.Processes.ts)
#
tr.Processes.Default.Command = (
- 'curl --verbose --ipv4 --header "Host: mYhOsT.teSt:{0}" hTtP://loCalhOst:{1}/'.format(server.Variables.Port, ts.Variables.port)
+ 'curl --verbose --ipv4 --header "Host: mYhOsT.teSt" hTtP://loCalhOst:{}/'.format(ts.Variables.port)
+)
+tr.Processes.Default.ReturnCode = 0
+
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = (
+ 'curl --verbose --ipv4 --proxy localhost:{} http://mYhOsT.teSt/xYz'.format(ts.Variables.port)
Review comment:
OK, this generates an absolute URL.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org