You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/07/24 09:39:47 UTC
[2/13] git commit: Core: Added possibility to switch provider in HTML
without referer
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 <mf...@redhat.com>
Authored: Tue Jul 24 09:35:08 2012 +0200
Committer: Michal fojtik <mf...@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