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

Reduce number of redirects from purl? #201

Open
yarikoptic opened this issue Apr 16, 2024 · 0 comments
Open

Reduce number of redirects from purl? #201

yarikoptic opened this issue Apr 16, 2024 · 0 comments

Comments

@yarikoptic
Copy link

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

full output from wget
 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?

  • adjust purl to point to https not http
  • adjust purl to point to ontobee.org not www.ontobee.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant