-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello again :),
I'm facing the problem, that FHIRExtinguisher tries to fetch linked resources by a non valid URL. The port extension :443
gets duplicated.
FHIRExtinguisher tries to request from the URL https://our.fhir.server:443:443/fhir?_getpages=12345...
After some digging in the sources, I found that the nextUrl
returned by bundleWrapper.link.find { it.relation == "next" }?.url
already is broken.
For a quick fix, I wrote the following patch:
--- a/src/main/kotlin/fhirextinguisher/FhirExtinguisher.kt
+++ b/src/main/kotlin/fhirextinguisher/FhirExtinguisher.kt
@@ -189,7 +189,11 @@ class FhirExtinguisher(
log.info { "Loading Bundle from $nextUrl" }
val bundle = fhirClient.fetchResourceFromUrl(bundleClass, nextUrl)
val bundleWrapper = BundleWrapper(bundleDefintion, bundle)
+
nextUrl = bundleWrapper.link.find { it.relation == "next" }?.url
+ if (nextUrl != null) {
+ nextUrl = nextUrl.replace(":443:443", ":443")
+ }
cacheBundleReference(bundleWrapper, columns)
for (bundleEntry in bundleWrapper.entry) {
subtables += processBundleEntry(columns, bundleEntry)
Do you know what goes wrong here? Thank you for your support!
Metadata
Metadata
Assignees
Labels
No labels