bneradt commented on code in PR #13435:
URL: https://github.com/apache/trafficserver/pull/13435#discussion_r3857342192
##########
src/proxy/http/HttpTransact.cc:
##########
@@ -1022,9 +1022,10 @@ HttpTransact::HandleBlindTunnel(State *s)
void
HttpTransact::StartRemapRequest(State *s)
{
- // Preserve effective url before remap, regardless of actual need for remap
+ // Preserve the effective URL before remap, regardless of the actual need
for remap.
s->unmapped_url.create(s->hdr_info.client_request.url_get()->m_heap);
s->unmapped_url.copy(s->hdr_info.client_request.url_get());
+ s->hdr_info.client_request.set_url_target_from_host_field(&s->unmapped_url);
Review Comment:
This helper already preserves that behavior. _fill_target_cache() checks the
request URL first and records its host and port when present; it only falls
back to the Host field when the URL has no host. Passing unmapped_url as the
destination then copies that effective target. An absolute-form request
therefore retains its URL host, so an additional guard would be redundant.
##########
tests/gold_tests/pluginTest/stats_over_http/stats_over_http.test.py:
##########
@@ -47,12 +48,28 @@ def __setupTS(self):
self.ts = Test.MakeATSProcess("ts")
self.ts.Disk.plugin_config.AddLine('stats_over_http.so _stats')
+ self.ts.Disk.logging_yaml.AddLines(
+ '''
+logging:
+ formats:
+ - name: unmapped_url
+ format: "%<cquuc>"
+ logs:
+ - filename: stats_over_http_url
+ format: unmapped_url
+'''.split("\n"))
Review Comment:
That is not the case here. The quote delimiters are indented, but the YAML
content itself begins at column zero: the resulting string starts with a
newline followed by logging:. Therefore logging is at the document root. The
rebased stats_over_http AuTest also passes with this configuration, so I am
leaving it as written.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]