From 39837b17097af1b6d225b4e610b309aefd1eb42b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 22 Aug 2015 15:52:50 -0700 Subject: metaprogram the HTTP_X_REQUEST_ID method we're already doing this with a bunch of other header data. --- actionpack/lib/action_dispatch/http/request.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'actionpack/lib/action_dispatch/http') diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 0f1c20b95e..1251121112 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -20,8 +20,6 @@ module ActionDispatch include ActionDispatch::Http::FilterParameters include ActionDispatch::Http::URL - HTTP_X_REQUEST_ID = "HTTP_X_REQUEST_ID".freeze # :nodoc: - autoload :Session, 'action_dispatch/request/session' autoload :Utils, 'action_dispatch/request/utils' @@ -36,6 +34,7 @@ module ActionDispatch HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM HTTP_NEGOTIATE HTTP_PRAGMA HTTP_CLIENT_IP HTTP_X_FORWARDED_FOR HTTP_VERSION + HTTP_X_REQUEST_ID ].freeze ENV_METHODS.each do |env| @@ -269,10 +268,6 @@ module ActionDispatch alias_method :uuid, :request_id - def x_request_id # :nodoc: - get_header(HTTP_X_REQUEST_ID) - end - # Returns the lowercase name of the HTTP server software. def server_software (get_header('SERVER_SOFTWARE') && /^([a-zA-Z]+)/ =~ get_header('SERVER_SOFTWARE')) ? $1.downcase : nil -- cgit v1.2.3