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

Pubmed is moving everything to https. #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bertrama
Copy link

See their announcement for more details

Net::HTTP doesn't auto-follow redirects, so checking pubmed will fail.

[1] pry(main)> url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=xml&rettype=full&id=11958783'
=> "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=xml&rettype=full&id=11958783"
[2] pry(main)> response = Net::HTTP.get_response(URI.parse(url))
=> #<Net::HTTPMovedPermanently 301 Moved Permanently readbody=true>
[3] pry(main)> url = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&retmode=xml&rettype=full&id=11958783'
[4] pry(main)> response = Net::HTTP.get_response(URI.parse(url))
=> #<Net::HTTPOK 200 OK readbody=true>

@jrochkind
Copy link
Member

Note that as a workaround anyone can simply set this config variable in their umlaut_services.yml:

      Pubmed:
        url: 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'

Should actually work with no code changes or version updates in apps. But I agree the code should be fixed.

I didn't actually realize anyone was using the pubmed adapter -- are you using it, do you find it useful, how?

The CI failures are unrelated to this PR, but should still be fixed of course.

@bertrama
Copy link
Author

We aren't using it right now, but we're looking at using it. 360Link can normally find articles by pubmed id, but they're either having problems with it in general, or having problems with it during these https tests.

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

Successfully merging this pull request may close these issues.

None yet

2 participants