You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:41:59 UTC
svn commit: r962264 - /incubator/deltacloud/trunk/server/server.rb
Author: lutter
Date: Thu Jul 8 23:41:58 2010
New Revision: 962264
URL: http://svn.apache.org/viewvc?rev=962264&view=rev
Log:
* server.rb: make sure we always return XML as the default
respond_to will take the first format block if the client didn't send an
Accept header.
Modified:
incubator/deltacloud/trunk/server/server.rb
Modified: incubator/deltacloud/trunk/server/server.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/server.rb?rev=962264&r1=962263&r2=962264&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/server.rb (original)
+++ incubator/deltacloud/trunk/server/server.rb Thu Jul 8 23:41:58 2010
@@ -92,8 +92,8 @@ get '/' do redirect '/api'; end
get '/api\/?' do
@version = 1.0
respond_to do |format|
- format.html { haml :"api/show" }
format.xml { haml :"api/show" }
+ format.html { haml :"api/show" }
end
end
@@ -242,12 +242,12 @@ collection :instances do
@image = driver.image(credentials, :id => params[:image_id])
instance = driver.create_instance(credentials, @image.id, params)
respond_to do |format|
- format.html { redirect instance_url(instance.id) }
format.xml do
response.status = 201 # Created
response['Location'] = instance_url(instance.id)
convert_to_xml(:instance, instance)
end
+ format.html { redirect instance_url(instance.id) }
end
end
end