Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 62c2b90

Browse files
committed
Merge pull request #73 from pemari-msft/master
Storage Client Library - 4.2.1
2 parents 5b83e4a + efea8ca commit 62c2b90

File tree

20 files changed

+90
-25
lines changed

20 files changed

+90
-25
lines changed

Lib/Common/Blob/CloudBlockBlob.Common.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,11 @@ private void ParseQueryAndVerify(StorageUri address, StorageCredentials credenti
515515
this.SnapshotTime = parsedSnapshot;
516516
}
517517

518-
this.ServiceClient = new CloudBlobClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials ?? parsedCredentials);
518+
if (this.ServiceClient == null)
519+
{
520+
this.ServiceClient = new CloudBlobClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials ?? parsedCredentials);
521+
}
522+
519523
this.Name = NavigationHelper.GetBlobName(this.Uri, this.ServiceClient.UsePathStyleUris);
520524
}
521525
}

Lib/Common/Blob/CloudPageBlob.Common.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,11 @@ private void ParseQueryAndVerify(StorageUri address, StorageCredentials credenti
512512
this.SnapshotTime = parsedSnapshot;
513513
}
514514

515-
this.ServiceClient = new CloudBlobClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials ?? parsedCredentials);
515+
if (this.ServiceClient == null)
516+
{
517+
this.ServiceClient = new CloudBlobClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials ?? parsedCredentials);
518+
}
519+
516520
this.Name = NavigationHelper.GetBlobName(this.Uri, this.ServiceClient.UsePathStyleUris);
517521
}
518522
}

Lib/Common/File/CloudFile.Common.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ public CloudFileDirectory Parent
262262
private void ParseQueryAndVerify(StorageUri address, StorageCredentials credentials)
263263
{
264264
this.attributes.StorageUri = address;
265-
this.ServiceClient = new CloudFileClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials);
265+
if (this.ServiceClient == null)
266+
{
267+
this.ServiceClient = new CloudFileClient(NavigationHelper.GetServiceClientBaseAddress(this.StorageUri, null /* usePathStyleUris */), credentials);
268+
}
269+
266270
this.Name = NavigationHelper.GetFileName(this.Uri, this.ServiceClient.UsePathStyleUris);
267271
}
268272
}

Lib/Common/Shared/Protocol/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ static HeaderConstants()
760760
/// <summary>
761761
/// Specifies the value to use for UserAgent header.
762762
/// </summary>
763-
public const string UserAgentProductVersion = "4.2.0";
763+
public const string UserAgentProductVersion = "4.2.1";
764764

765765
/// <summary>
766766
/// Master Windows Azure Storage header prefix.

Lib/Common/StorageException.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private static StorageException CoreTranslate(Exception ex, RequestResult reqRes
252252
else if (ex is TimeoutException)
253253
{
254254
reqResult.HttpStatusMessage = null;
255-
reqResult.HttpStatusCode = (int)HttpStatusCode.Unused;
255+
reqResult.HttpStatusCode = (int)HttpStatusCode.RequestTimeout;
256256
reqResult.ExtendedErrorInformation = null;
257257
return new StorageException(reqResult, ex.Message, ex);
258258
}
@@ -309,7 +309,7 @@ internal static StorageException TranslateDataServiceException(Exception ex, Req
309309
else if (ex is TimeoutException)
310310
{
311311
reqResult.HttpStatusMessage = null;
312-
reqResult.HttpStatusCode = (int)HttpStatusCode.Unused;
312+
reqResult.HttpStatusCode = (int)HttpStatusCode.RequestTimeout;
313313
reqResult.ExtendedErrorInformation = null;
314314
return new StorageException(reqResult, ex.Message, ex);
315315
}
@@ -351,6 +351,13 @@ private static void PopulateRequestResult(RequestResult reqResult, HttpWebRespon
351351
string tempDate = HttpWebUtility.TryGetHeader(response, "Date", null);
352352
reqResult.RequestDate = string.IsNullOrEmpty(tempDate) ? DateTime.Now.ToString("R", CultureInfo.InvariantCulture) : tempDate;
353353
reqResult.Etag = response.Headers[HttpResponseHeader.ETag];
354+
#endif
355+
}
356+
357+
if (response.ContentLength > 0)
358+
{
359+
#if !WINDOWS_RT
360+
reqResult.IngressBytes += response.ContentLength;
354361
#endif
355362
}
356363
}

Lib/WindowsDesktop/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
// You can specify all the values or you can default the Build and Revision Numbers
3535
// by using the '*' as shown below:
3636
// [assembly: AssemblyVersion("1.0.*")]
37-
[assembly: AssemblyVersion("4.2.0.0")]
38-
[assembly: AssemblyFileVersion("4.2.0.0")]
37+
[assembly: AssemblyVersion("4.2.1.0")]
38+
[assembly: AssemblyFileVersion("4.2.1.0")]
3939

4040
#if SIGN
4141
[assembly: InternalsVisibleTo(

Lib/WindowsDesktop/WindowsAzure.Storage.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>WindowsAzure.Storage</id>
5-
<version>4.2.0</version>
5+
<version>4.2.1</version>
66
<title>Windows Azure Storage</title>
77
<authors>Microsoft</authors>
88
<owners>Microsoft</owners>

Lib/WindowsPhone/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
//
3333
// You can specify all the values or you can default the Revision and Build Numbers
3434
// by using the '*' as shown below:
35-
[assembly: AssemblyVersion("4.2.0.0")]
36-
[assembly: AssemblyFileVersion("4.2.0.0")]
35+
[assembly: AssemblyVersion("4.2.1.0")]
36+
[assembly: AssemblyFileVersion("4.2.1.0")]
3737
[assembly: NeutralResourcesLanguageAttribute("en-US")]
3838

3939
#if SIGN

Lib/WindowsRuntime/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
// You can specify all the values or you can default the Build and Revision Numbers
2626
// by using the '*' as shown below:
2727
// [assembly: AssemblyVersion("1.0.*")]
28-
[assembly: AssemblyVersion("4.2.0.0")]
29-
[assembly: AssemblyFileVersion("4.2.0.0")]
28+
[assembly: AssemblyVersion("4.2.1.0")]
29+
[assembly: AssemblyFileVersion("4.2.1.0")]
3030
[assembly: ComVisible(false)]
3131

3232
#if SIGN

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Microsoft Azure Storage SDK for .NET (4.2.0)
1+
# Microsoft Azure Storage SDK for .NET (4.2.1)
22

33
The Microsoft Azure Storage SDK for .NET allows you to build Azure applications
44
that take advantage of scalable cloud computing resources.

0 commit comments

Comments
 (0)