Hi,

I am trying to find the correct way of signing a blob put request for
Atmos which also includes the "x-emc-force-overwrite" header set to
"true".

I see that there is a SignRequest object [1] that implements an
HttpFilter that should be used. But SignRequest operates on an
HttpRequest object. And the HttpRequest object is only returned by
signPutBlob. I was able to get this to work by doing the following:

1. HttpRequest request = blobstore.signPutBlob()
2. Create tempRequest from request and add the the
"x-emc-force-overwrite" header.
3. Get reference of the SignRequest object as say signRequest.
4. newRequest = signRequest.filter(tempRequest)
5. Use newRequest for writing the blob.

As can be seen, this is certainly a contrived way of doing this. Are
there better ways?

Also, is there a straightforward way of getting the reference to the
SignRequest object? Right now, I have to do something like:

blobStoreContext.utils().injector().getInstance(SignRequest.class);

Thanks in advance.
-Shri

[1] 
https://jclouds.apache.org/reference/javadoc/1.9.x/org/jclouds/atmos/filters/SignRequest.html

Reply via email to