Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rack_after_reply

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack_after_reply

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Rack After Reply

A hook for Rack apps which fires after the response has been sent, and the socket to the client has been closed.

This is the ideal time to perform delayable, non-backgroundable tasks, such as garbage collection, stats gathering, flushing logs, etc. without affecting response times at all.

Usage

Simply add your callbacks to env['rack_after_reply.callbacks'].

use Rack::ContentLength
use Rack::ContentType, 'text/plain'
run lambda { |env|
  env['rack_after_reply.callbacks'] << lambda { ... }
  [200, {}, ['hi']]
}

Support

Rack After Request works with these web servers:

  • Mongrel
  • Passenger
  • Thin
  • Unicorn
  • WEBrick (distributed with Ruby)

To request support for other web servers, open a ticket or submit a patch.

Contributing

  • Bug reports
  • Source
  • Patches: Fork on Github, send pull request.
    • Ensure patch includes tests.
    • Leave the version alone, or bump it in a separate commit.

Copyright (c) George Ogata. See LICENSE for details.

FAQs

Package last updated on 17 May 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc