@@ -63,31 +63,6 @@ internal static string GetChecksumHeaderKey(CoreChecksumAlgorithm checksumAlgori
63
63
return $ "{ _checksumHeaderPrefix } { checksumAlgorithm . ToString ( ) . ToLower ( ) } ";
64
64
}
65
65
66
- /// <remarks>
67
- /// Note, this was called directly from service packages prior to compression support
68
- /// being added shortly after 3.7.200. It's important to preserve the signature and functionality
69
- /// until the next minor version for those older 3.7.* service packages.
70
- /// </remarks>
71
- /// <summary>
72
- /// Attempts to select and then calculate the checksum for a request
73
- /// </summary>
74
- /// <param name="request">Request to calculate the checksum for</param>
75
- /// <param name="checksumAlgorithm">Checksum algorithm to use, specified on the request using a service-specific enum</param>
76
- /// <param name="fallbackToMD5">If checksumAlgorithm is <see cref="CoreChecksumAlgorithm.NONE"/>, this flag controls whether or not to fallback to using a MD5 to generate a checksum</param>
77
- [ Obsolete ( "This method is deprecated in favor of SetRequestChecksumV2" ) ]
78
- public static void SetRequestChecksum ( IRequest request , string checksumAlgorithm , bool fallbackToMD5 = true )
79
- {
80
- // TODO: As mentioned in the remarks section, this method used to be called from the marshallers in older service packages.
81
- // It's not used anymore from Core (which uses "SetRequestChecksumV2" instead), and should be removed in V4.
82
- if ( request . ChecksumData == null )
83
- {
84
- SetChecksumData ( request , checksumAlgorithm , fallbackToMD5 ) ;
85
- return ;
86
- }
87
-
88
- SetRequestChecksumV2 ( request , clientConfig : null ) ;
89
- }
90
-
91
66
/// <summary>
92
67
/// Attempts to select and then calculate the checksum for a request.
93
68
/// </summary>
@@ -314,40 +289,6 @@ private static CoreChecksumAlgorithm ConvertToCoreChecksumAlgorithm(string selec
314
289
return selectedCoreChecksumAlgorithm ;
315
290
}
316
291
317
- /// <summary>
318
- /// Set checksum data in marshaller after compressing request payload.
319
- /// </summary>
320
- /// <param name="request">Request to calculate the checksum for</param>
321
- /// <param name="checksumAlgorithm">Checksum algorithm to use, specified on the request using a service-specific enum</param>
322
- /// <param name="fallbackToMD5">This flag controls whether or not to fallback to using a MD5 to generate a checksum</param>
323
- [ Obsolete ( "This overload is deprecated in favor of the options that accept whether the checksum is required for the given request" ) ]
324
- public static void SetChecksumData ( IRequest request , string checksumAlgorithm , bool fallbackToMD5 = true )
325
- {
326
- // This overload will only be invoked from older service packages (i.e. not updated for the latest flexible checksums specification).
327
- // We need to maintain the previous behavior (of only setting a checksum if provided) to account for edge cases in multipart uploads (S3 was
328
- // the only service using the checksum trait in the initial revision of the specification).
329
-
330
- // The specific scenario we're concerned about is:
331
- // - Customer is using multiple SDK packages
332
- // - Customer updates one of their dependencies (let's say SQS), which brings the latest version of Core as well
333
- // - Previous version of S3 will still compile successfully since it specifies "AWSSDK.Core(>= 3.7.x && < 4.0.0)" as a dependency
334
- // - Large object is uploaded using the TransferUtility, and setting the checksum automatically for the individual parts will
335
- // cause the CompleteMPU call to fail (as our SDK will add the part checksums via CompleteMultipartUploadRequest.AddPartETags - which
336
- // S3 does not support).
337
-
338
- // TODO: Similar to "SetRequestChecksum", this method should be removed in V4.
339
- if ( ! string . IsNullOrEmpty ( checksumAlgorithm ) )
340
- {
341
- SetChecksumData ( request , checksumAlgorithm , fallbackToMD5 , isRequestChecksumRequired : true ) ;
342
- }
343
- else
344
- {
345
- // Important: We can't set ChecksumData to null as previous versions of the S3 package assume it'll be present.
346
- // The SkipChecksum flag is then used in the pipeline handler to determine whether the calculation should be performed.
347
- request . ChecksumData = new ChecksumData { SkipChecksum = true } ;
348
- }
349
- }
350
-
351
292
/// <summary>
352
293
/// Set checksum data in marshaller after compressing request payload.
353
294
/// </summary>
@@ -414,14 +355,6 @@ public class ChecksumData
414
355
/// </summary>
415
356
public string HeaderName { get ; set ; }
416
357
417
- /// <summary>
418
- /// TODO: This property is only used to handle the mismatch of older service packages and newer Core.
419
- /// It should also be removed in V4 (same comment applies to the internal parameterless constructor) .
420
- /// </summary>
421
- internal bool SkipChecksum { get ; set ; }
422
-
423
- internal ChecksumData ( ) { }
424
-
425
358
public ChecksumData ( string selectedChecksum , bool MD5Checksum , bool ? fallbackToMD5 , bool isRequestChecksumRequired , string headerName )
426
359
{
427
360
this . SelectedChecksum = selectedChecksum ;
0 commit comments