From a470b9e45de2ae63e9c7f194d67f05b7074f5dea Mon Sep 17 00:00:00 2001 From: Aleksandar Kostadinov Date: Wed, 13 Sep 2017 18:53:57 +0300 Subject: [PATCH] text/plain output for headers --- config.ru | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.ru b/config.ru index a07dd14..0c274dc 100755 --- a/config.ru +++ b/config.ru @@ -13,12 +13,12 @@ end map '/headers' do headers = proc do |env| - [200, { "Content-Type" => "text/html" }, [ + [200, { "Content-Type" => "text/plain" }, [ env.select {|key,val| key.start_with? 'HTTP_'} .collect {|key, val| [key.sub(/^HTTP_/, ''), val]} - .collect {|key, val| CGI::escapeHTML "#{key}: #{val}"} + .collect {|key, val| "#{key}: #{val}"} .sort - .join("
\n") + .join("\n") ]] end run headers