Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect to container #621

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

redirect to container #621

wants to merge 5 commits into from

Conversation

bourgeoa
Copy link
Contributor

@bourgeoa bourgeoa commented May 5, 2023

No description provided.

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
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
Contributor 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

src/fetcher.ts Outdated Show resolved Hide resolved
@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