Object copy requires a "Content-Length: 0" in the request#2
Object copy requires a "Content-Length: 0" in the request#2asmajlovic wants to merge 2 commits intorackspace:masterfrom
Conversation
There was a problem hiding this comment.
could you please fix the build error here. You are missing the ; at the end as well as you cannot put and int here, it needs to be a string.
headers.Add(ContentLength, "0");There was a problem hiding this comment.
One more thing, I think there was a miss understanding with the docs. The docs do not require a "0" as the content-type, but instead it reads that it requires a content-type even if it is "0":
Also, the X-Copy-From PUT requests require a Content-Length header, even if it is zero (0).
So, with this pull request, it is forcing the content type to zero which is wrong. The way it was written should be sufficient.
|
Hopefully good to go now. |
|
Being addressed through openstacknetsdk#86 |
|
@asmajlovic Sorry, i had pull requested to the wrong fork. This is actually being taken care of by: #4 |
As per the RAX API docs for Cloud Files, object copy requests via a PUT need the content length specified to be zero:
http://docs.rackspace.com/files/api/v1/cf-devguide/content/Copy_Object-d1e2241.html
I have modified the relevant section to check only if the header has been defined and create the new dictionary if not. The content length is explicitly provided in an add call.