gziphandler - Golang middleware to gzip HTTP responses

  •        755

This is a tiny Go package which wraps HTTP handlers to transparently gzip the response body, for clients which support it. Although it's usually simpler to leave that to a reverse proxy (like nginx or Varnish), this package is useful when that's undesirable.The docs can be found at godoc.org, as usual.

https://github.com/NYTimes/gziphandler

Tags
Implementation
License
Platform

   




Related Projects

Gin - HTTP web framework written in Go (Golang)

  •    Go

Gin is a web framework written in Go (Golang). It features a martini-like API with much better performance, up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love You can add global, per-group, and per-route middlewares, thousands of nested groups, nice JSON validation and rendering. And the performance will be still great. Gin uses httprouter internally, the fastest HTTP router for Golang. Httprouter was created by Julien Schmidt and it’s based in a Radix Tree algorithm.

compression - Node.js compression middleware

  •    Javascript

Node.js compression middleware. Returns the compression middleware using the given options. The middleware will attempt to compress response bodies for all request that traverse through the middleware, based on the given options.

browserify-middleware - express middleware for browserify, done right

  •    Javascript

With the exception of serving up directories (which requires req.path from express) everything is entirely framework independent. Simply pass in req res, and a callback that will only be called in the event of an error. If you think I've missed something, be sure to open an issue or submit a pull request.

heroku-deflater - Enable gzip compression on heroku, but don't compress images.

  •    Ruby

A simple rack middleware that enables compressing of your assets and application responses on Heroku, while not wasting CPU cycles on pointlessly compressing images and other binary responses. Before serving a file from disk to a gzip-enabled client, it will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.


Negroni - Idiomatic HTTP Middleware for Golang

  •    Go

Negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. Negroni is not a framework. It is a middleware-focused library that is designed to work directly with net/http.

interpose - Minimalist net/http middleware for golang

  •    Go

Interpose is a minimalist net/http middleware framework for golang. It uses http.Handler as its core unit of functionality, minimizing complexity and maximizing inter-operability with other middleware frameworks.All that it does is manage middleware. It comes with nothing baked in. You bring your own router, etc. See below for some well-baked examples.

HTTP Compression Library for Heavy Load Web Server

  •    

Deflater is a HTTP Compression Library, supporting Deflate (RFC 1950, RFC 1951) and GZip (RFC 1952). It is designed to encode and compress HTML content at once.

alice - Painless middleware chaining for Go

  •    Go

Alice provides a convenient way to chain your HTTP middleware functions and the app handler.None of the other middleware chaining solutions behaves exactly like Alice. Alice is as minimal as it gets: in essence, it's just a for loop that does the wrapping for you.

secure - HTTP middleware for Go that facilitates some quick security wins.

  •    Go

Secure is an HTTP middleware for Go that facilitates some quick security wins. It's a standard net/http Handler, and can be used with many frameworks or directly with Go's net/http package.Be sure to include the Secure middleware as close to the top (beginning) as possible (but after logging and recovery). It's best to do the allowed hosts and SSL check before anything else.

faraday-http-cache - a faraday middleware that respects HTTP cache

  •    Ruby

a Faraday middleware that respects HTTP cache, by checking expiration and validation of the stored responses. The middleware accepts a store option for the cache backend responsible for recording the API responses that should be stored. Stores should respond to write, read and delete, just like an object from the ActiveSupport::Cache API.

go-fault - Fault injection library in Go using standard http middleware

  •    Go

The fault package provides go http middleware that makes it easy to inject faults into your service. Use the fault package to reject incoming requests, respond with an HTTP error, inject latency into a percentage of your requests, or inject any of your own custom faults. The fault package works through standard go http middleware. You first create an Injector, which is a middleware with the code to be run on injection. Then you wrap that Injector in a Fault which handles logic about when to run your Injector.

oppressor - streaming http compression response negotiator

  •    Javascript

Return a duplex stream that will be compressed with gzip, deflate, or no compression depending on the accept-encoding headers sent.oppressor will emulate calls to http.ServerResponse methods like writeHead() so that modules like filed that expect to be piped directly to the response object will work.

rocky - Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js

  •    Javascript

A multipurpose, full-featured, middleware-oriented and hackable HTTP/S and WebSocket proxy with powerful built-in features such as versatile routing layer, traffic interceptor and replay to multiple backends, built-in balancer, traffic retry/backoff logic, hierarchical configuration, among others. Built for node.js/io.js.rocky can be fluently used programmatically or via command-line interface. It's framework agnostic, but you can optionally plug in with connect/express apps.

express-graphql - Create a GraphQL HTTP server with Express.

  •    Javascript

Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including Connect itself, Express and Restify.Use .get or .post (or both) rather than .use to configure your route handler. If you want to show GraphiQL in the browser, set graphiql: true on your .get handler.

tesla - The flexible HTTP client library for Elixir, with support for middleware and multiple adapters

  •    Elixir

Tesla is an HTTP client loosely based on Faraday. It embraces the concept of middleware when processing the request/response cycle. Note that this README refers to the master branch of Tesla, not the latest released version on Hex. See the documentation for the documentation of the version you're using.

imgmin - Lossy image optimization

  •    C

Image files constitute a majority of static web traffic.[17] Unlike text-based web file formats, binary image files do not benefit from built-in webserver-based HTTP gzip compression. imgmin offers an automated means for enforcing image quality as a standalone tool and as a webserver module. imgmin determines the optimal balance of image quality and filesize, often greatly reducing image size while retaining quality for casual use, which translates into more efficient use of storage and network bandwidth, which saves money and improves user experience. Websites are composed of several standard components. Most (HTML, CSS, Javascript, JSON, XML, etc) are text-based. They can be efficiently compressed for transfer via gzip, supported by all mainstream webservers and browsers. But image and video files are binary, non-text files, and generally are not worth auto-compressing in the webserver.

pgzip - Go parallel gzip (de)compression

  •    Go

Go parallel gzip compression/decompression. This is a fully gzip compatible drop in replacement for "compress/gzip". This will split compression into blocks that are compressed in parallel. This can be useful for compressing big amounts of data. The output is a standard gzip file.

urllib3 - Python HTTP library with thread-safe connection pooling, file post support, sanity friendly, and more

  •    Python

urllib3 is a powerful, sanity-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too. urllib3 brings many critical features that are missing from the Python standard libraries:

gentleman - Full-featured, plugin-oriented, composable HTTP client toolkit for Go

  •    Go

Full-featured, plugin-driven, middleware-oriented toolkit to easily create rich, versatile and composable HTTP clients in Go.gentleman embraces extensibility and composition principles in order to provide a flexible way to easily create featured HTTP client layers based on built-in or third-party plugins that you can register and reuse across HTTP clients.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.