QE ACK ... Test output ... curl -X GET -H 'Accept: application/xml' --user 'un;pw' http://localhost:3001/ec2?Action=DescribeImages <DescribeImagesResponse xmlns='http://ec2.amazonaws.com/doc/2012-04-01/'> <requestId>ac672643cee89d57a98455a5b9aea5d5</requestId> <imagesSet> <item> <imageId>img1</imageId> <imageState>available</imageState> <imageOwnerId>fedoraproject</imageOwnerId> <architecture>x86_64</architecture> <imageType>machine</imageType> <name>img1</name> <description>Fedora 10</description> </item> <item> ....
> From: [email protected] > To: [email protected] > Sent: Tuesday, September 4, 2012 4:25:59 PM > Subject: [PATCH] EC2: Fixed incorrectly mapped root_url > > From: Michal Fojtik <[email protected]> > > * EC2 frontend does not use Rabbit DSL but regular > Sinatra::Base class. Seems like this class does > preserve original Rack mapping in the root_url > which cause double-mapping (/ec2/ec2). > > * Note: This patch is just a hot-fix, we need to > investigate Rack mounting. > --- > server/lib/ec2/server.rb | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/server/lib/ec2/server.rb b/server/lib/ec2/server.rb > index 15b6000..a6c3089 100644 > --- a/server/lib/ec2/server.rb > +++ b/server/lib/ec2/server.rb > @@ -38,13 +38,14 @@ module Deltacloud::EC2 > enable :xhtml > enable :dump_errors > enable :show_errors > - enable :method_override > disable :show_exceptions > > - set :version, Deltacloud[:ec2].version > - set :root_url, Deltacloud[:ec2].root_url > + set :config, Deltacloud[:ec2] > + set :root_url, config.root_url > + set :root_path, config.root_url > + set :version, config.version > set :root, File.join(File.dirname(__FILE__), '..', '..') > - set :views, File.join(File.dirname(__FILE__), 'views') > + set :public_folder, root + '/public' > > error Deltacloud::EC2::QueryParser::InvalidAction do > status 400 > @@ -55,7 +56,7 @@ module Deltacloud::EC2 > headers 'Server' => 'Apache-Deltacloud-EC2/' + > settings.version > end > > - get Deltacloud[:ec2].root_url do > + get '/' do > headers 'Connection' => 'close' > unless params['Action'] > redirect settings.root_url, 301 > -- > 1.7.11.4 > >
