Given a base URL of HOST/path, when the broker client navigates the HAL paths it joins the given Base URL with the path defined in the HAL response. This results in duplicate context paths in subsequent requests:
See the following slightly modified log (for readability):
In this case, the URL given is https://notarealhost/pactbroker/, the HAL link is https://notarealhost/pactbroker/pacts/provider/{provider}/for-verification and the constructed URL is https://notarealhost/pactbroker/pactbroker/pacts/provider/MerchantsCore/for-verification (note the duplicate path).
I believe rather than joining the user defined BaseURL and extracting paths from the HAL resources, we should just follow the fully qualified HAL resources. Is there a reason (e.g. security) that we're not doing this?
Given a base URL of
HOST/path
, when the broker client navigates the HAL paths it joins the given Base URL with the path defined in the HAL response. This results in duplicate context paths in subsequent requests:See the following slightly modified log (for readability):
In this case, the URL given is
https://notarealhost/pactbroker/
, the HAL link ishttps://notarealhost/pactbroker/pacts/provider/{provider}/for-verification
and the constructed URL ishttps://notarealhost/pactbroker/pactbroker/pacts/provider/MerchantsCore/for-verification
(note the duplicate path).I believe rather than joining the user defined BaseURL and extracting paths from the HAL resources, we should just follow the fully qualified HAL resources. Is there a reason (e.g. security) that we're not doing this?