File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,21 @@ def call(env)
6666 :user_agent ,
6767 ]
6868
69+ ENV_KEYS = [
70+ "PATH_INFO" ,
71+ "REQUEST_METHOD" ,
72+ "REQUEST_PATH" ,
73+ "REQUEST_URI" ,
74+ "SCRIPT_NAME" ,
75+ "QUERY_STRING" ,
76+ "SERVER_PROTOCOL" ,
77+ "SERVER_NAME" ,
78+ "SERVER_PORT" ,
79+ "REMOTE_ADDR" ,
80+ "CONTENT_TYPE" ,
81+ "CONTENT_LENGTH" ,
82+ ]
83+
6984 def generate_backtrace ( io , exception , prefix : "Exception" )
7085 io . puts "#{ prefix } #{ exception . class . name } : #{ exception . to_s } "
7186
@@ -104,6 +119,13 @@ def generate_body(exception, env)
104119
105120 io . puts
106121
122+ ENV_KEYS . each do |key |
123+ value = env [ key ]
124+ io . puts "env[#{ key . inspect } ]: #{ value . inspect } "
125+ end
126+
127+ io . puts
128+
107129 env . select { |key , _ | key . start_with? "HTTP_" } . each do |key , value |
108130 io . puts "#{ key } : #{ value . inspect } "
109131 end
You can’t perform that action at this time.
0 commit comments