incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962189 - /incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb
Date Thu, 08 Jul 2010 23:35:19 GMT
Author: lutter
Date: Thu Jul  8 23:35:19 2010
New Revision: 962189

URL: http://svn.apache.org/viewvc?rev=962189&view=rev
Log:
* lib/sinatra/url_for.rb: allow using an explicit HOSTNAME

Modified:
    incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb

Modified: incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb?rev=962189&r1=962188&r2=962189&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb (original)
+++ incubator/deltacloud/trunk/server/libexec/lib/sinatra/url_for.rb Thu Jul  8 23:35:19 2010
@@ -25,7 +25,8 @@ module Sinatra
         else
           port = ":#{request.port}"
         end
-        base = "#{scheme}://#{request.host}#{port}#{request.script_name}"
+        request_host = HOSTNAME ? HOSTNAME : request.host
+        base = "#{scheme}://#{request_host}#{port}#{request.script_name}"
       else
         raise TypeError, "Unknown url_for mode #{mode}"
       end



Mime
View raw message