这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@syoyo

Description

@syoyo

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions