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

Allow URLs without any extension #34

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

ThomasVille
Copy link
Contributor

@ThomasVille ThomasVille commented Sep 10, 2024

Fixes #33.

When make_meta_uri is called, if the URL ends with an extension, injects the .meta extension to it. If not, then return an error because we can't assume we can add an extension to a URL that didn't have one.

@johanhelsing
Copy link
Owner

Thanks

Hmmm.... What would be the downside of just always adding .meta instead, even if there is no extension?

@ThomasVille
Copy link
Contributor Author

@johanhelsing I was thinking that if there's no extension in the original URL, then adding one doesn't make sense because the URL might end with something else than a file name.

For instance, if the glTF file is returned by a REST API like this:

https://example.com/api/gltf/8972016938af456cb3f8199e63a8673f016251/export

Then it doesn't make sense to send a query to:

https://example.com/api/gltf/8972016938af456cb3f8199e63a8673f016251/export.meta

This is basically the use-case I'm wanting to cover.

If you think we should send the query to .meta anyway then I can update my PR.

Copy link
Owner

@johanhelsing johanhelsing left a comment

Choose a reason for hiding this comment

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

I think it's ok like that. We can reevaluate later if someone has a use cause where we still would like to look for meta files.

@johanhelsing johanhelsing merged commit 01dbfc7 into johanhelsing:main Sep 16, 2024
3 checks passed
@johanhelsing
Copy link
Owner

Thanks ❤️

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.

Crash when loading URLs without an extension
2 participants