File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
src/aws-cpp-sdk-core/source/auth/signer Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -631,20 +631,22 @@ void AWSAuthV4Signer::UpdateUserAgentWithCredentialFeatures(Aws::Http::HttpReque
631631 Aws::StringStream credentialMetrics;
632632 bool firstFeature = true ;
633633
634- static const std::map<Aws::Client::UserAgentFeature, char > featureMap = {
635- {Aws::Client::UserAgentFeature::CREDENTIALS_ENV_VARS, ' g' },
636- // Add other credential mappings as needed
637- };
638-
639634 for (const auto & feature : features) {
640- auto it = featureMap.find (feature);
641- if (it != featureMap.end ()) {
642- if (!firstFeature) {
643- credentialMetrics << " ," ;
644- }
645- credentialMetrics << it->second ;
646- firstFeature = false ;
635+ char featureChar = 0 ;
636+ switch (feature) {
637+ case Aws::Client::UserAgentFeature::CREDENTIALS_ENV_VARS:
638+ featureChar = ' g' ;
639+ break ;
640+ // Add other credential feature mappings as needed
641+ default :
642+ continue ; // Skip non-credential features
643+ }
644+
645+ if (!firstFeature) {
646+ credentialMetrics << " ," ;
647647 }
648+ credentialMetrics << featureChar;
649+ firstFeature = false ;
648650 }
649651
650652 if (credentialMetrics.str ().empty ()) {
You can’t perform that action at this time.
0 commit comments