Skip to content
New issue

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

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

Already on GitHub? # to your account

[enhancement] Strict/Proper URI decoding/encoding #369

Closed
syoyo opened this issue Aug 16, 2022 · 1 comment
Closed

[enhancement] Strict/Proper URI decoding/encoding #369

syoyo opened this issue Aug 16, 2022 · 1 comment

Comments

@syoyo
Copy link
Owner

syoyo commented Aug 16, 2022

Describe the issue

glTF uses URI for its asset path.

KhronosGroup/glTF#1744
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#uris

Currently TinyGLTF implements simple URI decoding only:

// TODO(syoyo): Use uriparser https://uriparser.github.io/ for stricter Uri

Proper and strict URI decoding/encoding are recommended.
urlparser https://uriparser.github.io/ Could be a good candidate to handle URI path.

Also, it would need to provide a way to handle absolute URI(e.g. URI containing http prefix) through FS callback.

To Reproduce

  • OS
    Any
  • Compiler, compiler version, compile options
    Any
  • Please attach minimal and reproducible .glTF file if you got an issue related to .glTF data
    N/A

Expected behaviour

TinyGLTF decodes/encodes URIs correctly.

We may need glTF files containing various URIs to test.

@syoyo
Copy link
Owner Author

syoyo commented Jan 10, 2023

Providing strict URI parser may be difficult. For a while, let App/User write their own URI encoder/decoder. tinygltf now has URI callbacks thanks to: #397

@syoyo syoyo closed this as completed Jan 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant