Skip to content

Commit

Permalink
Increased HTTP Request id length
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Dec 3, 2014
1 parent 2793040 commit 5322d63
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/lotus/action/rack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ module Rack
# @api private
DEFAULT_RESPONSE_BODY = []

# The default HTTP Request ID length
#
# @since x.x.x
# @api private
#
# @see Lotus::Action::Rack#request_id
DEFAULT_REQUEST_ID_LENGTH = 16

# Override Ruby's hook for modules.
# It includes basic Lotus::Action modules to the given class.
#
Expand Down Expand Up @@ -134,7 +142,7 @@ def response
# @api private
def request_id
# FIXME make this number configurable and document the probabilities of clashes
@request_id ||= SecureRandom.hex(8)
@request_id ||= SecureRandom.hex(DEFAULT_REQUEST_ID_LENGTH)
end

private
Expand Down

0 comments on commit 5322d63

Please sign in to comment.