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

HTTP 307 and HTTP 308 Redirects are not handled #849

Closed
miranda-zhang opened this issue Feb 6, 2019 · 8 comments
Closed

HTTP 307 and HTTP 308 Redirects are not handled #849

miranda-zhang opened this issue Feb 6, 2019 · 8 comments
Assignees
Labels
Status: Fixed Added to indicate that a closed issue represents a bug that has been fixed Type: OWL API Bug A bug in the OWL API that is manifested in Protege. Should be reported on the OWL API tracker

Comments

@miranda-zhang
Copy link

My current configuration used redirect code 308 on
https://w3id.org/cocoon/v1.0
It opens fine in the browser, but if I try “Open from URL”, it throws a
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

If I try to open with the original link to file, it works fine in protoge.
https://miranda-zhang.github.io/cloud-computing-schema/v1.0/ontology.ttl

My redirect rules are listed here
https://github.com/perma-id/w3id.org/blob/master/cocoon/.htaccess

There is an issue filed with w3id.org, but I also suspect there maybe an issue with protoge too.
perma-id/w3id.org#1063

@balhoff
Copy link
Contributor

balhoff commented Feb 6, 2019

I have been seeing the same error when trying to open http://purl.obolibrary.org/obo/mondo.owl, which is hosted at osf.io.

@matthewhorridge matthewhorridge self-assigned this Feb 6, 2019
@matthewhorridge matthewhorridge added the Status: Reproduced For issues that are (critical) bugs, denotes that the bug is reproduced, but no further action taken label Feb 6, 2019
@matthewhorridge matthewhorridge added this to the Protégé 5.5.0 milestone Feb 6, 2019
@matthewhorridge
Copy link
Contributor

This is working in the 5.5.0-beta-SNAPSHOT. MONDO loads fine.

The redirect for coocon lands at a website, so the parse fails (but the redirect works).

@matthewhorridge matthewhorridge added Status: Fixed Added to indicate that a closed issue represents a bug that has been fixed and removed Status: Reproduced For issues that are (critical) bugs, denotes that the bug is reproduced, but no further action taken labels Feb 6, 2019
@miranda-zhang
Copy link
Author

miranda-zhang commented Feb 7, 2019

The redirect for coocon lands at a website, so the parse fails (but the redirect works).

I have tested with curl -H "Accept: application/ld+json" -L https://w3id.org/cocoon/v1.0.1
It returns the json document.
What request header is protoge using? Or is there anything wrong with my content negotiation?

@matthewhorridge
Copy link
Contributor

Hi @miranda-zhang,

What request header is protoge using? Or is there anything wrong with my content negotiation?

It uses request headers set by the OWL API, and application/rdf+xml is included in these. I'll do some more investigating and get back to you

@matthewhorridge
Copy link
Contributor

@miranda-zhang

I've just done some digging and I've found out that HTTP 308 redirects are in fact not followed. The OWL API that Protege uses follows HTTP 301 Moved Permanently, HTTP 302 Found and HTTP 303 See Other redirects.

As a workaround, are you able to change your redirect to a HTTP 301?

It seems like HTTP 308 (and HTTP 307 for that matter) redirects could/should be supported in the OWL API. I'll file a request for this.

p.s. This is the accept header for a request

application/ld+json; q=1.0, application/x-trig; q=1.0, application/owl+xml; q=1.0, application/rdf+xml; q=1.0, application/x-binary-rdf; q=1.0, text/owl-manchester; q=1.0, text/turtle; q=1.0, application/trix; q=1.0, application/xhtml+xml; q=1.0, text/owl-functional; q=1.0, application/rdf+json; q=1.0, text/n3; q=1.0, text/plain; q=1.0, text/x-nquads; q=1.0, application/xml; q=0.5, application/x-turtle; q=0.5, application/html; q=0.5, text/xml; q=0.5, text/rdf+n3; q=0.5, text/html; q=0.3, */*; q=0.09

@matthewhorridge matthewhorridge added Type: OWL API Bug A bug in the OWL API that is manifested in Protege. Should be reported on the OWL API tracker Status: Waiting for OWL API Release Waiting for an updated release of the OWL API for this issue to be resolved and removed Status: Fixed Added to indicate that a closed issue represents a bug that has been fixed labels Feb 7, 2019
@matthewhorridge
Copy link
Contributor

I've filed an issue for this on the OWL API tracker: owlcs/owlapi#821

@matthewhorridge matthewhorridge changed the title Does protege handle redirect code 308? HTTP 307 and HTTP 308 Redirects are not handled Feb 7, 2019
@matthewhorridge
Copy link
Contributor

Pushing this to 5.6.0 milestone because the beta-9 milestone seems stable and I'm reluctant to update the OWL API at this juncture.

matthewhorridge added a commit that referenced this issue Apr 18, 2019
This addresss #849.  It also addresses slow selection behavior (exhibited with GO-edit).
@matthewhorridge
Copy link
Contributor

Closed with the upgrade to the OWL API 4.5.11. Note @miranda-zhang that the RDF/XML file is not found (404 error) but this nothing to do with Protege.

@matthewhorridge matthewhorridge added Status: Fixed Added to indicate that a closed issue represents a bug that has been fixed and removed Status: Waiting for OWL API Release Waiting for an updated release of the OWL API for this issue to be resolved labels Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Fixed Added to indicate that a closed issue represents a bug that has been fixed Type: OWL API Bug A bug in the OWL API that is manifested in Protege. Should be reported on the OWL API tracker
Projects
None yet
Development

No branches or pull requests

3 participants