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 2010/09/30 13:00:45 UTC
svn commit: r1003011 -
/incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb
Author: mfojtik
Date: Thu Sep 30 11:00:45 2010
New Revision: 1003011
URL: http://svn.apache.org/viewvc?rev=1003011&view=rev
Log:
Preserving extension as part of ID
Modified:
incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb
Modified: incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb?rev=1003011&r1=1003010&r2=1003011&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb (original)
+++ incubator/deltacloud/trunk/server/lib/sinatra/respond_to.rb Thu Sep 30 11:00:45 2010
@@ -69,8 +69,7 @@ module Sinatra
# Remove extension from URI
# Extension will be available as a 'extension' method (extension=='txt')
- request.path_info.sub! %r{\.([^\./]+)$}, ''
- extension $1
+ extension request.path_info.match(/\.([^\.\/]+)$/).to_a.first
# If ?format= is present, ignore all Accept negotiations because
# we are not dealing with browser