OntoZoo / ontobee

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

Reduce number of redirects from purl? #201

Open yarikoptic opened 5 months ago

yarikoptic commented 5 months ago

ATM requesting from purl requires a good number of redirects to arrive at the target

full output from wget ```shell wget -S http://purl.obolibrary.org/obo/PATO_0000384 --2024-04-16 14:19:59-- http://purl.obolibrary.org/obo/PATO_0000384 Resolving purl.obolibrary.org (purl.obolibrary.org)... 104.18.37.59, 172.64.150.197, 2606:4700:4400::6812:253b, ... Connecting to purl.obolibrary.org (purl.obolibrary.org)|104.18.37.59|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 303 See Other Date: Tue, 16 Apr 2024 18:19:59 GMT Content-Type: text/html; charset=iso-8859-1 Transfer-Encoding: chunked Connection: keep-alive Location: http://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 CF-Cache-Status: DYNAMIC Server: cloudflare CF-RAY: 87562fd17dad4cee-BOS Location: http://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following] --2024-04-16 14:19:59-- http://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 Resolving www.ontobee.org (www.ontobee.org)... 141.214.2.48 Connecting to www.ontobee.org (www.ontobee.org)|141.214.2.48|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Date: Tue, 16 Apr 2024 18:19:59 GMT Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_wsgi/4.9.4 Python/3.11 PHP/7.4.33 Location: https://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 Content-Length: 306 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Location: https://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following] --2024-04-16 14:19:59-- https://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 Connecting to www.ontobee.org (www.ontobee.org)|141.214.2.48|:443... connected. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Date: Tue, 16 Apr 2024 18:20:00 GMT Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_wsgi/4.9.4 Python/3.11 PHP/7.4.33 Location: https://ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 Content-Length: 302 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Location: https://ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following] --2024-04-16 14:20:00-- https://ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 Resolving ontobee.org (ontobee.org)... 141.214.2.48 Connecting to ontobee.org (ontobee.org)|141.214.2.48|:443... connected. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Date: Tue, 16 Apr 2024 18:20:00 GMT Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_wsgi/4.9.4 Python/3.11 PHP/7.4.33 Location: https://ontobee.org/ontology/PATO?iri=http://purl.obolibrary.org/obo/PATO_0000384 Content-Length: 289 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 Location: https://ontobee.org/ontology/PATO?iri=http://purl.obolibrary.org/obo/PATO_0000384 [following] --2024-04-16 14:20:00-- https://ontobee.org/ontology/PATO?iri=http://purl.obolibrary.org/obo/PATO_0000384 Reusing existing connection to ontobee.org:443. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Tue, 16 Apr 2024 18:20:00 GMT Server: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_wsgi/4.9.4 Python/3.11 PHP/7.4.33 X-Powered-By: PHP/7.4.33 Content-Length: 3011 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/xml;charset=UTF-8 Length: 3011 (2.9K) [text/xml] Saving to: ‘PATO_0000384’ PATO_0000384 100%[=========================================>] 2.94K --.-KB/s in 0s 2024-04-16 14:20:00 (156 MB/s) - ‘PATO_0000384’ saved [3011/3011] ```
❯ xclip -o | grep '^Location'
Location: http://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following]
Location: https://www.ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following]
Location: https://ontobee.org/browser/rdf.php?o=PATO&iri=http://purl.obolibrary.org/obo/PATO_0000384 [following]
Location: https://ontobee.org/ontology/PATO?iri=http://purl.obolibrary.org/obo/PATO_0000384 [following]

a good number of which seems might be avoidable?