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.
Rack middleware to inflate incoming Gzip data from HTTP requests.
Degzipper is a Rack Middleware. That means that you can use it the same way that you use any other Rack middleware. For example, to use in a Sinatra application I might do this:
require 'sinatra'
require 'degzipper'
class MyApplication < Sinatra::Base
use Rack::Session::Cookie
use Degzipper::Middleware
end
For a Rails application this is handled for you automatically, just add the gem to your Gemfile.
Add this line to your application's Gemfile:
gem 'degzipper'
And then execute:
$ bundle
Or install it yourself as:
$ gem install degzipper
After you install Degzipper to your Rails application, give it a try. Simply gzip a file like so:
gzip my_file.json
And then send the gzipped file data to your route via a PUT or POST CURL request:
curl -X PUT --header 'Content-Encoding: gzip' --data-binary @my_file.json.gz http://example.com/myroute
Where before you would have been greeted with an ArgumentError like:
ArgumentError (invalid %-encoding (o?0??+8???ʶd?H?"C??ԥ5<??Y"??H6?????N??߽???Έ???Z?.?????0$ٸߏk0??%4??Vwg*????9?#?7FF?J??D?N
Now your application will recieve the data inflated as if it was never gzipped!
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Credit to relistan for the original gist
FAQs
Unknown package
We found that degzipper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.