serrislew commented on code in PR #13352:
URL: https://github.com/apache/trafficserver/pull/13352#discussion_r3669154628
##########
plugins/prefetch/plugin.cc:
##########
@@ -634,6 +634,14 @@ contHandleFetch(const TSCont contp, TSEvent event, void
*edata)
String expandedPath;
if (config.getNextPath().replace(workingPath, expandedPath)) {
+ if (expandedPath.empty()) {
+ /* A replacement that collapses to empty (e.g. every
referenced group was optional and
+ * absent) would otherwise be scheduled with a zero-length
path, which BgFetch skips --
+ * leaving the original request path in place and
prefetching the pristine URL itself.
+ * Stop rather than issue that self-prefetch. */
+ PrefetchError("prefetch pattern produced an empty path;
check the fetch-path-pattern replacement");
Review Comment:
If this is per transaction, will this flood our logs with this error?
--
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]