On 08/18/11 - 11:07:57AM, [email protected] wrote: > Hi Chris, (inline) > > On 17/08/11 21:12, David Lutterkort wrote: > >On Wed, 2011-08-17 at 09:57 -0400, Chris Lalancette wrote: > >>Hey Marios, > >> I know this is several months out of date, but I was just doing some > >>testing on the blob creation stuff and noticing that my libdeltacloud tests > >>were failing. I traced it down to the fact that the blob_id parameter > >>changed > >>from param[:blob_id] to param[:blob] when you added the streaming stuff to > >>blobs. > > Yes thats right. Initially we had one operation for creating blobs: > > POST /api/buckets/:bucket > > and this accepted (amongst others) the 'blob_id' parameter to define > the name of the blob > > Then, in order to implement streaming PUT through deltacloud I added: > > PUT /api/buckets/:bucket/:blob > > The name change for the parameter was, I can only guess, some > attempt to maintain consistency (i.e. 'blob' over 'blob_id') though > in hindsight was not really necessary. Your suggested patch: > > > post "#{Sinatra::UrlForHelper::DEFAULT_URI_PREFIX}/buckets/:bucket" do > bucket_id = params[:bucket] > - blob_id = params['blob'] > + blob_id = params['blob'] || params['blob_id'] > > seems fine to me in that it won't break anything. If it maintains > compatibility with your stuff then I personally have no objection to > making this addition. More on PUT vs POST below
OK, thanks. I pushed this change into the repository. -- Chris Lalancette
