-
Notifications
You must be signed in to change notification settings - Fork 128
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
Case insensitive matching #67
Comments
Arg. PURL.org is case sensitive, but http://purl.obolibrary.org/obo/ is not. So I get an Ontobee 404 for http://purl.obolibrary.org/obo/obi_0000070. What behaviour(s) do we want to enforce? @cmungall @alanruttenberg @kltm |
Can you give more context - what is the sequence by which we end up at http://purl.obolibrary.org/obo/obi_0000070? Is it a problem if http://purl.obolibrary.org/obo/obi_0000070 does not resolve? |
Sure. The current redirect sequence is:
As of this moment, the new system is case sensitive, so http://url.ontodev.org/obo/obi_0000070 doesn't match the OBI term redirect regex and fails over to the sequence above. If we make the new system case insensitive for all PURLs (without other changes), then the OBI term redirect rule will normalize the case from "obi" to "OBI" and the response will be 200:
The key difference is the case of the final term ID between item 4 and item 2. So more PURLs would resolve than currently do, and people might come to rely on IDs with the wrong case. This is actually more general: PURL.org handles everything it can in a case insensitive way, but any PURLs that currently bounce through BBOP are effectively case sensitive. I think our options are: A. make all rules case insensitive, and allow more PURLs to resolve Maybe it doesn't matter, at the end of the day. But it's a difference in behaviour that I want to make a clear decision about. This was supposed to be simple... |
URLs used in RDF are case sensitive, therefore IDs should be cases sensitive. URLs for artifacts should be case insensitive - that's the common expectation for web URLs. So, B. not so much to match current behavior as to ensure that the IDs are correct and the other URLs match convention. https://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_nc |
To be clear, http://purl.obolibrary.org/obo/obi_0000070 should 404 |
Note http://purl.obolibrary.org/obo/OBI_0000070 Same for all other IDs. Non-id URLs can 302 |
If we want to be forgiving we can redirect IDs with the wrong case sensitivity to a page that tells the user that this is the case and they should correct any incorrect URLs to the correct case-sensitive version. |
Note that most of our IDSPACEs are upper case, but the id policy allows for lowercase as well. (from id policy) The yaml has an id field but not an idspace field. Either the id field should be understood as the idspace and the case should be fixed, or the there should be an additional idspace entry with the correct case. |
I agree with Alan's reasoning. I'll start implementing the following:
I don't have time to implement Alan's "forgiving" suggestion. If we want to do that, please file a new issue for it. |
- makes explicit link to OBO ID policy - `id` is reserved in Python, so `idspace` is slightly better - update example files - update Python scripts - update all config files - update README with link to policy
- term redirects are still case sensitive - regex entries are still free-form - update examples - update translate scripts - update README examples
PURL.org seems to be case insensitive. These two URLs resolve to the same target:
Apache is case sensitive by default, so I think we need to add
(?i)
to the front of everyRedirectMatch
.The text was updated successfully, but these errors were encountered: