deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1215129 - /deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb
Date Fri, 16 Dec 2011 13:44:42 GMT
Author: mfojtik
Date: Fri Dec 16 13:44:41 2011
New Revision: 1215129

URL: http://svn.apache.org/viewvc?rev=1215129&view=rev
Log:
Core: Added fix for wrong handling of REQUEST_PATH in platforms like Passenger

Modified:
    deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb

Modified: deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb?rev=1215129&r1=1215128&r2=1215129&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb (original)
+++ deltacloud/trunk/server/lib/sinatra/rack_matrix_params.rb Fri Dec 16 13:44:41 2011
@@ -79,8 +79,12 @@ module Rack
         env['REQUEST_URI'] = env['REQUEST_PATH']
         env['REQUEST_PATH'] = env['PATH_INFO']
       end
-      env['REQUEST_PATH'] = env['REQUEST_PATH'].gsub(/;([^\/]*)/, '').gsub(/\?(.*)$/, '')
-      env['PATH_INFO'] = env['REQUEST_PATH']
+
+      # This is needed for OpenShift deployment / Passenger
+      if env['REQUEST_PATH']
+        env['REQUEST_PATH'] = env['REQUEST_PATH'].gsub(/;([^\/]*)/, '').gsub(/\?(.*)$/, '')
+        env['PATH_INFO'] = env['REQUEST_PATH']
+      end
 
       # (2) Append the matrix params to the 'normal' request params
       # FIXME: Make this work for multipart/form-data



Mime
View raw message