deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/13] git commit: Core: Added possibility to switch provider in HTML without referer
Date Tue, 24 Jul 2012 07:39:47 GMT
Core: Added possibility to switch provider in HTML without referer


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

Branch: refs/heads/master
Commit: e6501775c4c9c233120809b32da0ac33c59ed0fd
Parents: 9a0601b
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue Jul 24 09:35:08 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Jul 24 09:38:05 2012 +0200

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/e6501775/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index d842c62..3e3e84e 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -65,7 +65,7 @@ module Deltacloud
         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)
+        current_matrix_driver = env['HTTP_REFERER'] ? env["HTTP_REFERER"].match(/\;(driver)=(\w*).*$/i)
: nil
         if current_matrix_driver
           redirect "#{Deltacloud.config[:deltacloud].root_url}\;driver=#{$2}\;provider=#{param_provider}",
301
         else


Mime
View raw message