ruby-rdf / rdf-vocab

Common RDF Vocabularies
The Unlicense
50 stars 29 forks source link

MODS URI incorrect? #42

Closed dunn closed 7 years ago

dunn commented 7 years ago

In https://github.com/ruby-rdf/rdf-vocab/blob/90da02358cd20142d2f8a50397bfea1e40bc7b58/lib/rdf/vocab.rb#L229-L232 it lists the base URI for MODS as "http://www.loc.gov/mods/rdf/v1#", so we get things like the following:

irb(main):003:0> RDF::Vocab::MODS.edition
=> #<RDF::Vocabulary::Term:0x3fd764423c38 URI:http://www.loc.gov/mods/rdf/v1#edition>

But that URI 404s:

🔥  curl -IL http://www.loc.gov/mods/rdf/v1#edition
HTTP/1.1 301 Moved Permanently
Date: Tue, 09 Aug 2016 22:28:34 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Set-Cookie: __cfduid=d4fb9ff2e3ba7f2a2a149bbd69bf276601470781714; expires=Wed, 09-Aug-17 22:28:34 GMT; path=/; domain=.loc.gov; HttpOnly
Location: http://www.loc.gov/standards/mods/rdf/v1
Server: cloudflare-nginx
CF-RAY: 2cfea4527b4253cc-LAX

HTTP/1.1 404 Not Found
Date: Tue, 09 Aug 2016 22:28:34 GMT
Content-Type: text/html
Connection: keep-alive
Set-Cookie: __cfduid=d4fb9ff2e3ba7f2a2a149bbd69bf276601470781714; expires=Wed, 09-Aug-17 22:28:34 GMT; path=/; domain=.loc.gov; HttpOnly
Accept-Ranges: bytes
Server: cloudflare-nginx
CF-RAY: 2cfea453bb5b53cc-LAX

Is the URI base supposed to be "http://www.loc.gov/mods/modsrdf/v1#" instead? That's also where the namespace document is: http://www.loc.gov/standards/mods/modsrdf/v1/

no-reply commented 7 years ago

This looks like a Library of Congress infrastructure problem.

The namespace URI is correct, see the OWL: xmlns:modsrdf="http://www.loc.gov/mods/rdf/v1#".

It looks like LoC redirect targets the wrong location (incidentally, it also seems to use an awkward response code).

I'll leave this open, in case anyone knows anything more, but I'd recommend reporting the issue to LoC.

gkellogg commented 7 years ago

We can always specify a different download location, if they are unresponsive.

dunn commented 7 years ago

I reported the issue to LoC, but if they don't fix it soon then alternate URIs would be great.

ntra00 commented 7 years ago

Hi, I think we've solved the problem at LC. Please let me know if it still behaves unexpectedly. Thanks, Nate Trail

no-reply commented 7 years ago

Thanks @ntra00!

While we have your attention, can you comment on the use of 301 Moved Permanently? This status code informs clients that they should update references to the resource. Standard practice is to use 303 See Other.

$  curl -IL http://www.loc.gov/mods/rdf/v1#edition
HTTP/1.1 301 Moved Permanently
Date: Wed, 10 Aug 2016 14:44:55 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Set-Cookie: __cfduid=d3853360dfa4354e906c8a709f2c65ba41470840294; expires=Thu, 10-Aug-17 14:44:54 GMT; path=/; domain=.loc.gov; HttpOnly
Location: http://www.loc.gov/standards/mods/rdf/v1
Server: cloudflare-nginx
CF-RAY: 2d043a837b421bc7-SEA

HTTP/1.1 301 Moved Permanently
Date: Wed, 10 Aug 2016 14:44:55 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Set-Cookie: __cfduid=de75b69d5f4423526a3336bd8a29fa86a1470840295; expires=Thu, 10-Aug-17 14:44:55 GMT; path=/; domain=.loc.gov; HttpOnly
Location: http://www.loc.gov/standards/mods/rdf/v1/
Server: cloudflare-nginx
CF-RAY: 2d043a848b5a1bc7-SEA

HTTP/1.1 200 OK
Date: Wed, 10 Aug 2016 14:44:55 GMT
Content-Type: text/html
Connection: keep-alive
Set-Cookie: __cfduid=de75b69d5f4423526a3336bd8a29fa86a1470840295; expires=Thu, 10-Aug-17 14:44:55 GMT; path=/; domain=.loc.gov; HttpOnly
Last-Modified: Wed, 20 Jun 2012 12:48:45 GMT
Accept-Ranges: bytes
Server: cloudflare-nginx
CF-RAY: 2d043a851b661bc7-SEA