deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: FIXES DTACLOUD_173: Missing parameter validation for POST blob
Date Thu, 29 Mar 2012 13:02:50 GMT
Updated Branches:
  refs/heads/master bd67983ca -> 8e01f0625


FIXES DTACLOUD_173: Missing parameter validation for POST blob

https://issues.apache.org/jira/browse/DTACLOUD-173


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/8e01f062
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/8e01f062
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/8e01f062

Branch: refs/heads/master
Commit: 8e01f062556092cd964e8545379db12b76a0c56d
Parents: bd67983
Author: marios <marios@redhat.com>
Authored: Mon Mar 26 14:23:09 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Thu Mar 29 16:01:41 2012 +0300

----------------------------------------------------------------------
 server/lib/deltacloud/server.rb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/8e01f062/server/lib/deltacloud/server.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
index dacc6db..f0f8cbc 100644
--- a/server/lib/deltacloud/server.rb
+++ b/server/lib/deltacloud/server.rb
@@ -862,6 +862,8 @@ collection :buckets do
 
     operation :create do
       description "Create new blob"
+      param :blob_id,  :string,  :required
+      param :blob_data, :hash, :required
       control do
         bucket_id = params[:bucket]
         blob_id = params['blob_id']
@@ -881,6 +883,7 @@ collection :buckets do
         respond_to do |format|
           format.xml { haml :"blobs/show" }
           format.html { haml :"blobs/show"}
+          format.json {convert_to_json(:blob, @blob)}
         end
       end
     end


Mime
View raw message