Skip to content

Load library descriptor from URL with redirection #248

Closed
@hanslovsky

Description

@hanslovsky

I attach a library descriptor as an artifact to a GitHub release. Loading the library descriptor from that release fails

%use jep@url[https://github.com/hanslovsky/jepyter/releases/download/jepyter-0.1.8/jep.json]

with the following error message:

Failed to process '%use jep@url[https://github.com/hanslovsky/jepyter/releases/download/jepyter-0.1.8/jep.json]' command. Error during library deserialization. Library descriptor text:
<html><body>You are being <a href="https://github-releases.githubusercontent.com/365409064/7185a300-b914-11eb-8e3a-879aa22cfb06?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210520%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20210520T024519Z&amp;X-Amz-Expires=300&amp;X-Amz-Signature=de25b6a24d8e079662b20b3ad2b7ac5f6dc6e135a1aa95eb956c34c6e6b695f9&amp;X-Amz-SignedHeaders=host&amp;actor_id=0&amp;key_id=0&amp;repo_id=365409064&amp;response-content-disposition=attachment%3B%20filename%3Djep.json&amp;response-content-type=application%2Foctet-stream">redirected</a>.</body></html>

The link redirects. With curl, I can add the -L flag to follow redirection:

~ curl -L https://github.com/hanslovsky/jepyter/releases/download/jepyter-0.1.8/jep.json
{
  "description": "Java Embedded Python.",
  "properties": {
    "jepyter.version": "jepyter-0.1.8",
    "jep.version": "3.9.1"
  },
  "link": "https://github.com/ninia/jep",
  "repositories": [
    "https://jitpack.io"
  ],
  "dependencies": [
    "black.ninia:jep:$jep.version",
    "me.hanslovsky:jepyter:$jepyter.version"
  ]
}

Would it be possible to follow redirection when providing the library descriptor as a URL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions