- 
                Notifications
    
You must be signed in to change notification settings  - Fork 870
 
Add DownloadResponse mapping #4063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4b5b83a    to
    b28f801      
    Compare
  
    b28f801    to
    a47780d      
    Compare
  
    a47780d    to
    5bd3140      
    Compare
  
    5bd3140    to
    20772b5      
    Compare
  
    20772b5    to
    7b4b267      
    Compare
  
    7b4b267    to
    19dcad3      
    Compare
  
    19dcad3    to
    44c48e2      
    Compare
  
    44c48e2    to
    1fbd586      
    Compare
  
    1fbd586    to
    79996ec      
    Compare
  
    | response.ContentLanguage = S3Transforms.ToString(responseData.GetHeaderValue("Content-Language")); | ||
| if (responseData.IsHeaderPresent("Content-Length")) | ||
| response.Headers.ContentLength = long.Parse(responseData.GetHeaderValue("Content-Length"), CultureInfo.InvariantCulture); | ||
| response.Headers.ContentLanguage = S3Transforms.ToString(responseData.GetHeaderValue("Content-Language")); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds this to the header to make it easy for TransferUtilityDownloadResponse, since we just copy source.header to target.header
| // Resolve alias to actual property name | ||
| var resolvedPropertyName = ResolvePropertyName(propertyName, sourceType.Name); | ||
| var sourceProperty = sourceType.GetProperty(resolvedPropertyName); | ||
| 
               | 
          
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this change because of the issue with contentlanguage. previously we were only setting the property and not the value in the headers. this makes it so we set both the property and the headers value in the source object
| /// <summary> | ||
| /// The collection of headers for the response. | ||
| /// </summary> | ||
| public HeadersCollection Headers { get; set; } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it matter if this should be regular set or internal set?
stack-info: PR: #4063, branch: GarrettBeatty/stacked/5
79996ec    to
    1efc02d      
    Compare
  
    
Stacked PRs:
Description
This change adds a function to map the GetObjectResponse to TransferUtilityDownloadResponse.
Motivation and Context
Testing
Types of changes
Checklist
License