Permalink
Browse files

Fix to CloudBlob.Properties.CacheControl doesn't retain value.

  • Loading branch information...
1 parent fe5c23c commit 1aa528f93755cdfe60bd1fd470c5b3f2be5a822b @justinyu justinyu committed Jun 20, 2012
@@ -252,6 +252,11 @@ internal class Constants
/// </summary>
internal const string ContentLengthElement = "Content-Length";
+ /// <summary>
+ /// XML element for cache control fields.
+ /// </summary>
+ internal const string CacheControlElement = "Cache-Control";
+
/// <summary>
/// XML element for content MD5 fields.
/// </summary>
@@ -262,6 +262,7 @@ protected override IEnumerable<IListBlobEntry> ParseXml()
string contentType = null;
string contentEncoding = null;
string contentLanguage = null;
+ string cacheControl = null;
string contentMD5 = null;
BlobType? blobType = null;
LeaseStatus leaseStatus = LeaseStatus.Unspecified;
@@ -326,6 +327,10 @@ protected override IEnumerable<IListBlobEntry> ParseXml()
contentLanguage = reader.ReadElementContentAsString();
blobNeedToRead = false;
break;
+ case Constants.CacheControlElement:
+ cacheControl = reader.ReadElementContentAsString();
+ blobNeedToRead = false;
+ break;
case Constants.ContentMD5Element:
contentMD5 = reader.ReadElementContentAsString();
blobNeedToRead = false;
@@ -403,6 +408,7 @@ protected override IEnumerable<IListBlobEntry> ParseXml()
blob.Properties = new BlobProperties();
blob.Properties.ContentEncoding = contentEncoding;
blob.Properties.ContentLanguage = contentLanguage;
+ blob.Properties.CacheControl = cacheControl;
blob.Properties.ContentMD5 = contentMD5;
blob.Properties.Length = contentLength ?? 0;
blob.Properties.ContentType = contentType;

0 comments on commit 1aa528f

Please sign in to comment.