On 08/18/11 - 10:37:46AM, [email protected] wrote: > Hi Chris, > > basically, what David said... more inline > > On 17/08/11 21:00, David Lutterkort wrote: > >On Wed, 2011-08-17 at 11:20 -0400, Chris Lalancette wrote: > >>All, > >> It seems to me that blob metadata updates aren't quite working in > >> 0.4.0. > >>It looks like BlobHelper::extract_blob_metadata_hash is being fed > >>request.env > >>directly, but I don't think that is right. If your client does a POST with > >>form parameters like: > >> > >>HTTP-X-Deltacloud-Blobmeta-name=myname > >> > >>Then those parameters are actually available in > >>request.env['rack.request.query_hash']. The attached patch makes that > >>change > > This is true - however, our API defines that the way to *update blob > metadata* is using request headers > (http://incubator.apache.org/deltacloud/api#h4_3_11). I don't think > we ever supported blob header updates using form fields. I mean, I > don't think this has anything to do with 0.4 as this wouldn't have > worked for the blob update operation even in 0.3. I checked through > the git history though this stuff is a little old so i may have > missed something and be wrong on this.
No, you are right. When I wrote the stuff in libdeltacloud I must have screwed something up. > > >>and seems to fix it in my tests. However, it is also possible that my > >>libdeltacloud client is doing the wrong thing here. Thoughts? > >> > > > >It's a little confusing since we also take the metadata params as > >request params - but that is only there to support the HTML UI, and only > >done for POST. > > As David says, I suspect the confusion stems from the fact that for > the blob *create* operation using POST, blob metadata is defined > using form fields > (http://incubator.apache.org/deltacloud/api#h4_3_8). The POST > operation for creating blobs is a special case, and is only there to > support the HTML interface. More on this in response to your other > email ("Blob Creation") And yeah, that's where I think my confusion came from. I'll fix up my libdeltacloud code to use request headers. Thanks for reviewing it. -- Chris Lalancette
