Skip to content

Commit 1e5d566

Browse files
committed
Squashable commit; addressing PR feedback
Signed-off-by: Laird Nelson <[email protected]>
1 parent 6ef1dca commit 1e5d566

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/src/main/asciidoc/se/webclient.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ xref:discovery.adoc#_web_client_discovery_integration[`discovery`], `metrics`, `
412412
413413
==== Enabling the service
414414
415-
In order for a service to function, their dependency needs to be added in the application's `pom.xml`. Below are examples on how to enable the built-in services:
415+
In order for a service to function, its dependencies need to be added in the application's `pom.xml`. Below are examples on how to enable the built-in services:
416416
417417
* `discovery` (see xref:discovery.adoc#_web_client_discovery_integration[its documentation])
418418
+

webclient/discovery/src/main/java/io/helidon/webclient/discovery/DefaultWebClientDiscovery.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public WebClientServiceResponse handle(Chain chain, WebClientServiceRequest requ
109109
}
110110
return chain.proceed(request);
111111
}
112+
if (LOGGER.isLoggable(DEBUG)) {
113+
LOGGER.log(DEBUG, "DiscoveryRequest: " + discoveryRequest);
114+
}
112115

113116
URI discoveredUri = this.prototype()
114117
.discovery()
@@ -313,13 +316,19 @@ static Optional<DiscoveryRequest> of(Map<String, String> properties, UriInfo uri
313316
}
314317
continue;
315318
}
319+
if (LOGGER.isLoggable(DEBUG)) {
320+
LOGGER.log(DEBUG, "Testing " + uriInfoUri + " to see if it is prefixed with " + prefixUri);
321+
}
316322
// Relativize the URI in flight against the prefix URI, using the well-defined semantics of
317323
// URI#relativize(String), yielding, if there is a match, in most cases, just a simple path.
318324
URI diff = prefixUri.relativize(uriInfoUri);
319325
if (diff == uriInfoUri) {
320326
// Relativization "failed"; see
321327
// https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/URI.html#relativize(java.net.URI). No
322328
// problem; we just didn't match this particular prefix. Carry on to the next one.
329+
if (LOGGER.isLoggable(DEBUG)) {
330+
LOGGER.log(DEBUG, "Ignoring " + prefixUri + " because it does not prefix " + uriInfoUri);
331+
}
323332
continue;
324333
}
325334
// We matched a prefix and now have the raw materials to query Discovery. Return early.

0 commit comments

Comments
 (0)