Skip to content

Commit 1d71532

Browse files
committed
The Copy Object API will preserve content types as long as none is set in the requests
1 parent 1f7ce9a commit 1d71532

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/corelib/Providers/Rackspace/CloudFilesProvider.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,10 +1095,7 @@ public void CopyObject(string sourceContainer, string sourceObjectName, string d
10951095
else
10961096
{
10971097
// make sure to preserve the content type during the copy operation
1098-
Dictionary<string, string> sourceHeaders = GetObjectHeaders(sourceContainer, sourceObjectName, region, useInternalUrl, identity);
1099-
string contentType;
1100-
if (sourceHeaders.TryGetValue("Content-Type", out contentType))
1101-
settings.ContentType = contentType;
1098+
settings.ContentType = null;
11021099
}
11031100

11041101
ExecuteRESTRequest(identity, urlPath, HttpMethod.COPY, headers: headers, settings: settings);

0 commit comments

Comments
 (0)