AliyunOSSiOSTests/OSSSingerTest.m [329:359]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    XCTAssertTrue([authPat isEqualToString:requestMessage.headerParams[OSSHttpHeaderAuthorization]]);
    
    // 2
    signHeaders = [NSMutableSet new];
    [signHeaders addObject:@"abc"];
    [signHeaders addObject:@"ZAbc"];
    [signHeaders addObject:@"x-oss-head1"];
    [signHeaders addObject:@"x-oss-no-exist"];

    requestMessage = [OSSAllRequestNeededMessage new];
    requestMessage.httpMethod = @"PUT";
    requestMessage.bucketName = bucket;
    requestMessage.objectKey = key;
    requestMessage.headerParams = headers;
    requestMessage.params = parameters;
    requestMessage.additionalHeaderNames = signHeaders;
    
    resource = [@"/" stringByAppendingString:((bucket != nil) ? [bucket stringByAppendingString:@"/"] : @"")];
    resource = [resource stringByAppendingString:(key != nil ? key : @"")];
    signerParam = [OSSSignerParams new];
    signerParam.credentialProvider = credentialProvider;
    signerParam.resourcePath = resource;
    signerParam.product = product;
    signerParam.region = region;
    
    signer = [OSSSignerBase createRequestSignerWithSignerVersion:version
                                                    signerParams:signerParam];
    [signer sign:requestMessage];
    
    NSLog(@"%@", requestMessage.headerParams);
    XCTAssertTrue([authPat isEqualToString:requestMessage.headerParams[OSSHttpHeaderAuthorization]]);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



AliyunOSSiOSTests/OSSSingerTest.m [418:448]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    XCTAssertTrue([authPat isEqualToString:requestMessage.headerParams[OSSHttpHeaderAuthorization]]);
    
    // 2
    signHeaders = [NSMutableSet new];
    [signHeaders addObject:@"abc"];
    [signHeaders addObject:@"ZAbc"];
    [signHeaders addObject:@"x-oss-head1"];
    [signHeaders addObject:@"x-oss-no-exist"];

    requestMessage = [OSSAllRequestNeededMessage new];
    requestMessage.httpMethod = @"PUT";
    requestMessage.bucketName = bucket;
    requestMessage.objectKey = key;
    requestMessage.headerParams = headers;
    requestMessage.params = parameters;
    requestMessage.additionalHeaderNames = signHeaders;
    
    resource = [@"/" stringByAppendingString:((bucket != nil) ? [bucket stringByAppendingString:@"/"] : @"")];
    resource = [resource stringByAppendingString:(key != nil ? key : @"")];
    signerParam = [OSSSignerParams new];
    signerParam.credentialProvider = credentialProvider;
    signerParam.resourcePath = resource;
    signerParam.product = product;
    signerParam.region = region;
    
    signer = [OSSSignerBase createRequestSignerWithSignerVersion:version
                                                    signerParams:signerParam];
    [signer sign:requestMessage];
    
    NSLog(@"%@", requestMessage.headerParams);
    XCTAssertTrue([authPat isEqualToString:requestMessage.headerParams[OSSHttpHeaderAuthorization]]);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



