OntoZoo / ontobee

Ontobee is a linked data server for ontologies. See: http://www.ontobee.org.
27 stars 5 forks source link

Ontobee returns HTTP 200 OK for terms that do not exist #55

Closed jamesaoverton closed 8 years ago

jamesaoverton commented 8 years ago

Ontobee is returning HTTP 200 OK status for terms that do not exist. It should return HTTP 404 Not Found. This is a serious problem.

Example of a non-existent term: http://www.ontobee.org/ontology/OBI?iri=http://purl.obolibrary.org/obo/OBI_1

The page has useless content, an empty RDF element:

HTTP/1.1 200 OK
Connection: close
Content-Type: text/xml
Content-Length: 713
X-Powered-By: PHP/5.3.3
Server: Apache/2.2.15 (Red Hat)
Date: Tue, 17 Nov 2015 14:29:42 GMT

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://www.ontobee.org/ontology/view/OBI?iri=http://purl.obolibrary.org/obo/OBI_1"?>
<rdf:RDF xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://www.w3.org/2002/07/owl"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:obo="http://purl.obolibrary.org/obo/"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"/>

<!-- Generated by the OWL API (version 3.2.4.1806) http://owlapi.sourceforge.net -->

On Safari 9.0.1 (11601.2.7.2) and Chrome 46.0.2490.86 (64-bit) the page just never renders. On Firefox 38.0.5 I get an error:

Error loading stylesheet: A network error occurred loading an XSLT stylesheet:http://www.ontobee.org/ontology/view/OBI?iri=http://purl.obolibrary.org/obo/OBI_1
yongqunh commented 8 years ago

This issue appears new to the new version.

The original version: http://ori.ontobee.hegroup.org/ontology/OBI?iri=http://purl.obolibrary.org/obo/OBI_1 does return 404 Not Found.

Edison, Can you take a look at this issue?

Thanks, Oliver

From: James A. Overton [mailto:notifications@github.com] Sent: Tuesday, November 17, 2015 9:36 AM To: OntoZoo/ontobee Subject: [ontobee] Ontobee returns HTTP 200 OK for terms that do not exist (#55)

Ontobee is returning HTTP 200 OK status for terms that do not exist. It should return HTTP 404 Not Found. This is a serious problem.

Example of a non-existent term: http://www.ontobee.org/ontology/OBI?iri=http://purl.obolibrary.org/obo/OBI_1

The page has useless content, an empty RDF element:

HTTP/1.1 200 OK

Connection: close

Content-Type: text/xml

Content-Length: 713

X-Powered-By: PHP/5.3.3

Server: Apache/2.2.15 (Red Hat)

Date: Tue, 17 Nov 2015 14:29:42 GMT

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="http://www.ontobee.org/ontology/view/OBI?iri=http://purl.obolibrary.org/obo/OBI_1"?>

<rdf:RDF xmlns="http://www.w3.org/2002/07/owl#"

 xml:base="http://www.w3.org/2002/07/owl"

 xmlns:dc="http://purl.org/dc/elements/1.1/"

 xmlns:obo="http://purl.obolibrary.org/obo/"

 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"

 xmlns:owl="http://www.w3.org/2002/07/owl#"

 xmlns:xsd="http://www.w3.org/2001/XMLSchema#"

 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

 xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"/>

On Safari 9.0.1 (11601.2.7.2) and Chrome 46.0.2490.86 (64-bit) the page just never renders. On Firefox 38.0.5 I get an error:

Error loading stylesheet: A network error occurred loading an XSLT stylesheet:http://www.ontobee.org/ontology/view/OBI?iri=http://purl.obolibrary.org/obo/OBI_1

— Reply to this email directly or view it on GitHubhttps://github.com/OntoZoo/ontobee/issues/55.


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

jamesaoverton commented 8 years ago

This is the correct URL for the old version of Ontobee:

http://ori.ontobee.hegroup.org/browser/rdf.php?o=OBI&iri=http://purl.obolibrary.org/obo/OBI_1

It also returns HTTP 200 OK status, which is wrong, but at least the page renders and says "Term Not Found".

e4ong1031 commented 8 years ago

I updated the server to return both the 404 status and correct page. Please take a look and let me know if a further action is needed. Thanks.

jamesaoverton commented 8 years ago

Thanks. I now get a 404 for that test page.

However the same empty RDF/XML content appears after the HTML, making this 404 page invalid HTML. I don't think that the RDF/XML should be included.

e4ong1031 commented 8 years ago

Okay, the RDF is also removed.