Skip to content

redirect to container#621

Open
bourgeoa wants to merge 5 commits into
mainfrom
redirect
Open

redirect to container#621
bourgeoa wants to merge 5 commits into
mainfrom
redirect

Conversation

@bourgeoa
Copy link
Copy Markdown
Member

@bourgeoa bourgeoa commented May 5, 2023

No description provided.

Comment thread src/fetcher.ts
let baseUrl = options.original.value
const isContainer = kb.any(options.original, null, ns.ldp('Container'))
console.log('@@ isContainer ' + isContainer)
if (isContainer && !baseUrl.endsWith('/')) baseUrl = baseUrl + '/'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the proper way to solve this problem, what if the redirect goes to a different path altogether (for whatever reason)? We should be reading from the response.url instead. And if we don't consider redirecting to a completely different resource a valid situation, throw an error rather than keep going with potentially wrong data.

Copy link
Copy Markdown
Member Author

@bourgeoa bourgeoa May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I was on your line but that was conflicting with the point raised by @timbl that there was (may have been) a proxy related reason not to use the response.url

Comment thread src/fetcher.ts Outdated
@bourgeoa bourgeoa requested review from angelo-v and timbl May 5, 2023 17:40
@bourgeoa bourgeoa self-assigned this May 5, 2023
@bourgeoa bourgeoa added the bug label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants