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

Root link parsing is not filtering based on media types #1325

Closed
turingtestfail opened this issue Mar 28, 2024 · 2 comments · Fixed by #1497
Closed

Root link parsing is not filtering based on media types #1325

turingtestfail opened this issue Mar 28, 2024 · 2 comments · Fixed by #1497
Assignees
Milestone

Comments

@turingtestfail
Copy link

I have a STAC Catalog that supports multiple media type implementations of the root link in the Catalog. It appears that the stac_object.get_root_link call is not passing a media type to stac_object.get_single_link, leading to it trying to parse representations other than expected (eg the HTML version instead of json).

I think this issue is similar to what was discussed in #1255

Thanks

@jsignell
Copy link
Member

This is totally reasonable. I just worry that it might break things for people who might not have media_type defined on their root link. I just double checked the spec for links and type is not a required field.

So to support existing users I think we would want to first look for a link with the matching on rel AND media_type and then if None just match on rel.

@jsignell
Copy link
Member

Just realized that #1255 (comment) has a very similar suggestion. The difference being that the match is on rel AND (media_type OR no media_type)

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 a pull request may close this issue.

3 participants