@@ -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 }
0 commit comments