if ( userAgent != null ) {
request.addHeader(HEADER_USER_AGENT, userAgent);
}
AmazonWebServiceRequest awsreq = request.getOriginalRequest();
if (awsreq != null) {
RequestClientOptions opts = awsreq.getRequestClientOptions();
if (opts != null) {
String userAgentMarker = opts.getClientMarker(Marker.USER_AGENT);
if (userAgentMarker != null) {
request.addHeader(HEADER_USER_AGENT,
createUserAgentString(userAgent, userAgentMarker));
}
}