diff options
author | Stephen Best <bestie@gmail.com> | 2013-08-13 08:18:52 +0100 |
---|---|---|
committer | James Tucker <jftucker@gmail.com> | 2014-07-13 14:02:29 -0700 |
commit | b8cb4d1f2c37868d9fecb4202a364ca7879ef287 (patch) | |
tree | 84a4de401d903b3cbe2c17a19e1172c5dbc01b9b /lib/rack/showexceptions.rb | |
parent | 893a2c505a3a43b4f224b50ea06567dacb473cae (diff) | |
download | rack-b8cb4d1f2c37868d9fecb4202a364ca7879ef287.tar.gz |
Restore public API
Diffstat (limited to 'lib/rack/showexceptions.rb')
-rw-r--r-- | lib/rack/showexceptions.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rack/showexceptions.rb b/lib/rack/showexceptions.rb index 0e8a5952..d8127380 100644 --- a/lib/rack/showexceptions.rb +++ b/lib/rack/showexceptions.rb @@ -45,11 +45,14 @@ module Rack ] end - private + def prefers_plaintext?(env) + !accepts_html(env) + end def accepts_html?(env) env["HTTP_ACCEPT"] && env["HTTP_ACCEPT"].include?("text/html") end + private :accepts_html? def dump_exception(exception) string = "#{exception.class}: #{exception.message}\n" |