Skip to content

Don't use HTTP HEAD to determine package availability#975

Merged
cmoesel merged 2 commits intomasterfrom
headless-loading
Dec 10, 2021
Merged

Don't use HTTP HEAD to determine package availability#975
cmoesel merged 2 commits intomasterfrom
headless-loading

Conversation

@cmoesel
Copy link
Member

@cmoesel cmoesel commented Dec 10, 2021

The packages.fhir.org server no longer allows HTTP HEAD requests. Since SUSHI used HTTP HEAD to determine if a package was available on packages.fhir.org, this is obviously a problem.

Now we will just attempt the download on packages.fhir.org first and if there is an error, redo it on packages2.fhir.org. In the future, however, we should use the version-listing capability that is now part of the API (see zulip). But.. this will suffice for now and causes less churn in the code while @jafeltra continues to refactor this code into a new module.

To test, create a SUSHI project with this dependency:

dependencies:
  de.gematik.isik-basismodul: 1.0.2

On master, it will fail to download it. On this branch, it will succeed.

The packages.fhir.org server no longer allows HTTP HEAD requests.  Since SUSHI used HTTP HEAD to determine if a package was available on packages.fhir.org, this is obviously a problem.

Now we will just attempt the download on packages.fhir.org first and if there is an error, redo it on packages2.fhir.org.
@cmoesel cmoesel merged commit 9f86e2d into master Dec 10, 2021
@cmoesel cmoesel deleted the headless-loading branch December 10, 2021 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants