Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public static void enforce(final TrafficRouter trafficRouter, final Request requ
if(!"Denied".equals(redirectURIString)){
routeResult.addUrl(new URL(redirectURIString));
}else{
LOGGER.warn("RegionalGeo: this needs a better error message, createRedirectURIString returned denied");
LOGGER.debug("RegionalGeo: no availabe cache for relative path, 503 will be sent");
}
}
}
Expand Down Expand Up @@ -468,6 +468,14 @@ private static void updateTrack(final Track track, final RegionalGeoResult regio
private static String createRedirectURIString(final HTTPRequest request, final DeliveryService deliveryService,
final Cache cache, final RegionalGeoResult regionalGeoResult) {

if (regionalGeoResult.getType() == ALTERNATE_WITHOUT_CACHE) {
return regionalGeoResult.getUrl();
}

if (cache == null) {
return "Denied";
}

if (regionalGeoResult.getType() == ALLOWED) {
return deliveryService.createURIString(request, cache);
}
Expand All @@ -476,10 +484,6 @@ private static String createRedirectURIString(final HTTPRequest request, final D
return deliveryService.createURIString(request, regionalGeoResult.getUrl(), cache);
}

if (regionalGeoResult.getType() == ALTERNATE_WITHOUT_CACHE) {
return regionalGeoResult.getUrl();
}

return "Denied"; // DENIED
}

Expand Down
Loading