![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
open_uri_redirections
Advanced tools
This gem applies a patch to OpenURI to optionally allow redirections from HTTP to HTTPS, or from HTTPS to HTTP.
This is based on this patch and this gem, and modified to allow redirections in both directions.
Here is the problem it tries to solve:
$ irb
1.9.2p320 :001 > require 'open-uri'
=> true
1.9.2p320 :002 > open('http://github.com')
RuntimeError: redirection forbidden: http://github.com -> https://github.com/
And here is how you can use this patch to follow the redirections:
$ irb
1.9.2p320 :001 > require 'open-uri'
=> true
> require 'open_uri_redirections'
=> true
1.9.2p320 :002 > open('http://github.com', :allow_redirections => :safe)
=> #<File:/var/folders/...>
The patch contained in this gem adds the :allow_redirections option to OpenURI#open
:
:allow_redirections => :safe
will allow HTTP => HTTPS redirections.:allow_redirections => :all
will allow HTTP => HTTPS redirections and HTTPS => HTTP redirections.Before using this gem, read this:
https://gist.github.com/1271420
https://bugs.ruby-lang.org/issues/3719
https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb
https://github.com/obfusk/open_uri_w_redirect_to_https
Use it at your own risk!
Add this line to your application's Gemfile:
gem 'open_uri_redirections'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install open_uri_redirections
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that open_uri_redirections demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.