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

Get namespace ad by longest match, not first #140

Closed
jhiemstrawisc opened this issue Sep 14, 2023 · 0 comments
Closed

Get namespace ad by longest match, not first #140

jhiemstrawisc opened this issue Sep 14, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jhiemstrawisc
Copy link
Member

@matyasselmeci experienced a bug with the director when requesting information for the path /chtc/PUBLIC where the information returned by the director corresponded to namespace /chtc. It looks like the director will return the first matching prefix without checking if there's a more complete one. This also appears to be a bug already solved in another spot by the old OSDF client.

@jhiemstrawisc jhiemstrawisc added the bug Something isn't working label Sep 14, 2023
@jhiemstrawisc jhiemstrawisc added this to the v7.1.0 milestone Sep 14, 2023
@jhiemstrawisc jhiemstrawisc self-assigned this Sep 14, 2023
jhiemstrawisc added a commit to jhiemstrawisc/pelican that referenced this issue Sep 14, 2023
Previously, when two namespaces like /chtc and /chtc/PUBLIC existed in the cache,
the matchPrefix function wound up matching whichever happened to be read first.
Now it matches against the longest prefix, so a request for path
/chtc/PUBLIC/foo/bar will always match /chtc/PUBLIC.

Closes issue PelicanPlatform#140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant