Closed mbklein closed 3 years ago
-- Copied from Slack comments by elrayle on dev channel 2020-08-14 9:10am ET
I’m not sure the change for LOC in QA was all that was needed. I can fetch by id, but search returns 0 results.
The current URL generated is…
https://id.loc.gov/search/?q=History--&q=cs%3Ahttps%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects&format=json
A URL that returns results is…
https://id.loc.gov/search/?q=History--&format=json
The code that produces the first URL has been around for at least 4 years. I assume the purpose is to limit the search to subjects.
Alright, I figured it out… the URL should be…
https://id.loc.gov/search/?q=cs:http://id.loc.gov/authorities/subjects&q=History--&format=json
Notice the q=cs URL is http instead of https.
The cs URL is generated in Qa::Authorities::LocSubauthority.
LOC recently starting requiring
https:
for allid.loc.gov
requests. (Identifiers are stillhttp:
, but if you access the site usinghttp:
, you’ll get a302 Moved Permanently
redirect to thehttps:
version). If QA isn’t already respecting redirects (and probably even if it is), it should probably be updated to usehttps:
on all LOC calls.