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

HTTPS Proxy #111

Open
Bjoernsen opened this issue Nov 1, 2016 · 1 comment
Open

HTTPS Proxy #111

Bjoernsen opened this issue Nov 1, 2016 · 1 comment

Comments

@Bjoernsen
Copy link

I am not able to fetch taxonomy data. Bio::NCBI::REST::EFetch.taxonomy(12345, 'xml')

The result: RuntimeError: Non-HTTP proxy

The reason is that we have to use a http and https proxy. But the method Bio::Command.start_http_uri only checks for URI::HTTP and not URI::HTTPS.

https://github.com/bioruby/bioruby/blob/master/lib/bio/command.rb#L733

With this small fix, the method works for me:

# from
raise 'Non-HTTP proxy' if proxyuri.class != URI::HTTP
# to
raise 'Non-HTTP proxy' if !(proxyuri.class == URI::HTTP || proxyuri.class == URI::HTTPS)
@ngoto
Copy link
Member

ngoto commented Nov 4, 2016

The line rejecting non-HTTP proxy was taken from Ruby's open-uri.rb.
https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb#L258

The fact that the latest open-uri.rb in Ruby still has a code to rejects non-HTTP proxy suggests that Ruby does not support https://xxxx/ as a proxy server. (Note that ordinary http proxy servers support https protocol via CONNECT method with http.)

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

2 participants