File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/aws-cpp-sdk-core/source/auth/signer Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -630,10 +630,11 @@ void AWSAuthV4Signer::UpdateUserAgentWithCredentialFeatures(Aws::Http::HttpReque
630630 }
631631 }
632632
633- // Append credential features to existing UA
634- Aws::String existingUA = request.GetHeaderValue (USER_AGENT);
635- Aws::StringStream updatedUA;
636- updatedUA << existingUA << " m/" << credentialFeatures.str ();
637-
638- request.SetUserAgent (updatedUA.str ());
633+ // Only append if we have credential features
634+ if (!credentialFeatures.str ().empty ()) {
635+ Aws::String existingUA = request.GetHeaderValue (USER_AGENT);
636+ Aws::StringStream updatedUA;
637+ updatedUA << existingUA << " m/" << credentialFeatures.str ();
638+ request.SetUserAgent (updatedUA.str ());
639+ }
639640}
You can’t perform that action at this time.
0 commit comments