|
From: <tom...@us...> - 2010-01-29 20:34:15
|
Revision: 2092
http://ndlb.svn.sourceforge.net/ndlb/?rev=2092&view=rev
Author: tombenner
Date: 2010-01-29 20:34:09 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
Changed the routing for Thl::UtilsController#proxy to use /?proxy_url= instead of just /, to avoid issue with Apache rejecting paths with escaped "/"s that aren't in GET params
Modified Paths:
--------------
portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb
portal/ror/plugins/thdl_integration/trunk/config/routes.rb
Modified: portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb
===================================================================
--- portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb 2010-01-29 18:49:35 UTC (rev 2091)
+++ portal/ror/plugins/thdl_integration/trunk/app/controllers/thl/utils_controller.rb 2010-01-29 20:34:09 UTC (rev 2092)
@@ -5,8 +5,9 @@
# We want to grab params that are part of the requested URL, but ignore ones that are supplied by Rails
ignored_params = ["proxy_url", "action", "controller"]
url_params = params.reject{|param, val| ignored_params.include?(param) }.collect{ |param, val| param + '=' + CGI.escape(val) }.join('&')
- url = params[:proxy_url].join('/')
- url += '?' + url_params unless url_params.blank?
+
+ url = params[:proxy_url]
+ url += '&' + url_params unless url_params.blank?
url = "http://www.thlib.org" + url if url[0,1] == "/"
# Parse the URL with URI.parse() so we can work with its parts more easily
Modified: portal/ror/plugins/thdl_integration/trunk/config/routes.rb
===================================================================
--- portal/ror/plugins/thdl_integration/trunk/config/routes.rb 2010-01-29 18:49:35 UTC (rev 2091)
+++ portal/ror/plugins/thdl_integration/trunk/config/routes.rb 2010-01-29 20:34:09 UTC (rev 2092)
@@ -1,7 +1,7 @@
ActionController::Routing::Routes.draw do |map|
map.namespace(:thl) do |thl|
- thl.connect 'utils/proxy/*proxy_url', :controller => 'utils', :action => 'proxy'
+ thl.connect 'utils/proxy/', :controller => 'utils', :action => 'proxy'
end
end
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|