From 54456eef0e8a63fa064f8693ce7c2367a427980a Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 14 Sep 2012 14:52:38 +0200 Subject: [PATCH] Bug #1472: Set content type correctly in Ozones (cherry picked from commit 719047d0a730fc0bc520f8b4619e0d710600aafa) --- src/ozones/Server/ozones-server.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ozones/Server/ozones-server.rb b/src/ozones/Server/ozones-server.rb index 1f32396e6b..2f12abd655 100755 --- a/src/ozones/Server/ozones-server.rb +++ b/src/ozones/Server/ozones-server.rb @@ -191,6 +191,7 @@ end before do cache_control :no_store + content_type 'application/json', :charset => 'utf-8' unless request.path=='/login' || request.path=='/' unless authorized? @@ -224,6 +225,7 @@ end # HTML Requests ############################################################################## get '/' do + content_type 'text/html', :charset => 'utf-8' return File.read(File.dirname(__FILE__)+ '/templates/login.html') unless authorized? @@ -236,6 +238,7 @@ get '/' do end get '/login' do + content_type 'text/html', :charset => 'utf-8' File.read(File.dirname(__FILE__)+'/templates/login.html') end @@ -253,9 +256,9 @@ end ############################################################################## # Config and Logs ############################################################################## -get '/config' do - config -end +# get '/config' do +# config +# end ############################################################################## # GET information