Skip to content

404 when retrieving dataset URL with encoded question mark #1653

Closed

Description

@veyndan

Environment

  • Server version: 6.0.0
  • Node.js version: 16.20.0
  • npm version: 9.5.0

Description

When running the below, I'm receiving a 404, when I'd expect for it to succeed. The below uses the Inrupt Solid Client library.

const containerUrl = …
const url = containerUrl + encodeURIComponent(`https://www.veyndan.com?foo=bar`);
await saveSolidDatasetAt(url, await createSolidDataset(), {fetch: fetch});
for (const thing of getThingAll(await getSolidDataset(containerUrl, {fetch: fetch}))) {
	console.log(await getSolidDataset(thing.url, {fetch: fetch})); // This receives a 404
}

I ran the above on my Inrupt Pod, and it succeeded as expected.

Activity

  1. added
    🐛 bug
    on Jun 8, 2023
  2. jvherweg commented on Jun 8, 2023

    @jvherweg
    Member

    After looking into this it seems our URL -> file path converter generates invalid file paths causing this issue. https%3A%2F%2Fwww.veyndan.com%3Ffoo%3Dbar becomes https:%2F%2Fwww.veyndan.com?foo=bar. Will need to ensure no unsupported characters get added to the path or at the very least throw an error.

    Seems the problem specifically occurs with a : in the path, in other cases an error is thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions