pgxn / pgxn-api

Maintain and serve a REST API to search PGXN mirrors
http://pgxn.org/
15 stars 2 forks source link

Distribution names in URLs should resolve case-insensitlvely #22

Closed theory closed 9 months ago

theory commented 10 years ago

This works:

http://api.pgxn.org/dist/pgtap/0.94.0/META.json

But this does not:

http://api.pgxn.org/dist/pgTAP/0.94.0/META.json

Seems like, since release and extension names are case-insensitive, maybe the should be allowed to be any case in the URI. Perhaps even this?

http://api.pgxn.org/dist/PGTAP/0.94.0/META.json

Same goes for these?

http://api.pgxn.org/src/pgTAP/pgtap-0.94.0/ http://master.pgxn.org/dist/pgTAP/1.0.0/META.json

theory commented 7 years ago

Also does not work:

https://pgxn.org/dist/hll/reference.html

But this does:

https://pgxn.org/dist/hll/REFERENCE.html

theory commented 9 months ago

This is handled by Plack::App::File here:

https://github.com/pgxn/pgxn-api/blob/638ae86604f3232e9bef27b6a57608bd239321ac/lib/PGXN/API/Router.pm#L51-L57

And honestly these files are written lowercase and the docs say they should all be lowercase. So I think this is fine to leave as-is.