deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Fix redirection to root_url/change drivers/provider via HTML UI
Date Mon, 11 Jun 2012 08:02:06 GMT
Updated Branches:
  refs/heads/master a8596f513 -> c71c8ccee


Fix redirection to root_url/change drivers/provider via HTML UI


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c71c8cce
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c71c8cce
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c71c8cce

Branch: refs/heads/master
Commit: c71c8cceee27fb356651fd3100dc2ac6fd83accd
Parents: a8596f5
Author: marios <marios@redhat.com>
Authored: Mon Jun 11 10:33:29 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Mon Jun 11 10:33:29 2012 +0300

----------------------------------------------------------------------
 server/lib/deltacloud/server.rb |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c71c8cce/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index cdb7150..32acb38 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -44,7 +44,7 @@ module Deltacloud
 
     set :config, Deltacloud[:deltacloud]
 
-    get config.root_url + '/?' do
+    get Deltacloud.config[:deltacloud].root_url + '/?' do
       if params[:force_auth]
         return [401, 'Authentication failed'] unless driver.valid_credentials?(credentials)
       end
@@ -55,20 +55,20 @@ module Deltacloud
       end
     end
 
-    post config.root_url + '/?' do
+    post Deltacloud.config[:deltacloud].root_url + '/?' do
       param_driver, param_provider = params["driver"], params["provider"]
       if param_driver
-        redirect "#{config.root_url}\;driver=#{param_driver}", 301
+        redirect "#{Deltacloud.config[:deltacloud].root_url}\;driver=#{param_driver}", 301
       elsif param_provider && param_provider != "default"
 #FIXME NEEDS A BETTER WAY OF GRABBING CURRENT DRIVER FROM MATRIX PARAMS...
         current_matrix_driver = env["HTTP_REFERER"].match(/\;(driver)=(\w*).*$/i)
         if current_matrix_driver
-          redirect "#{config.root_url}\;driver=#{$2}\;provider=#{param_provider}", 301
+          redirect "#{Deltacloud.config[:deltacloud].root_url}\;driver=#{$2}\;provider=#{param_provider}",
301
         else
-          redirect "#{config.root_url}\;provider=#{param_provider}", 301
+          redirect "#{Deltacloud.config[:deltacloud].root_url}\;provider=#{param_provider}",
301
         end
       else
-        redirect "#{config.root_url}", 301
+        redirect "#{Deltacloud.config[:deltacloud].root_url}", 301
       end
     end
 


Mime
View raw message