From 1db377c898a49417c669a52aaf75014f6a31158f Mon Sep 17 00:00:00 2001 From: mguetlein Date: Thu, 13 Jan 2011 14:10:59 +0100 Subject: remove old classification? in model.rb, add ie hack to overwrite --- lib/overwrite.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/overwrite.rb') diff --git a/lib/overwrite.rb b/lib/overwrite.rb index e5ed5c3..ffeba21 100644 --- a/lib/overwrite.rb +++ b/lib/overwrite.rb @@ -1,6 +1,10 @@ # class overwrites aka monkey patches # hack: store sinatra in global var to make url_for and halt methods accessible -before{ $sinatra = self unless $sinatra } +before { + $sinatra = self unless $sinatra + # stupid internet explorer does not ask for text/html, add this manually + request.env['HTTP_ACCEPT'] += ";text/html" if request.env["HTTP_USER_AGENT"]=~/MSIE/ +} # handle errors manually # this is to return 502, when an error occurs during a rest-call (see rest_client_wrapper.rb) -- cgit v1.2.3