This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Responses with HTTP status codes that should not have an entity | |
| STATUS_WITH_NO_ENTITY_BODY = Set.new((100..199).to_a << 204 << 304) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: | |
| # http://github.com/rubyist/aasm/blob/baceb4b53e296cd45ac3acbd5df291e14b2993aa/lib/state_transition.rb | |
| def perform(obj) | |
| case @guard | |
| when Symbol, String | |
| obj.send(@guard) | |
| when Proc | |
| @guard.call(obj) | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: | |
| # http://github.com/macournoyer/thin/blob/d6334d80e2c21af8b6d9647b9ae17d687df825df/lib/thin/backends/base.rb | |
| # Initialize a new connection to a client. | |
| def initialize_connection(connection) | |
| connection.backend = self | |
| connection.app = @server.app | |
| connection.comm_inactivity_timeout = @timeout | |
| connection.threaded = @threaded | |