mirror of https://github.com/apache/jclouds.git
don't override USER_AGENT if already specified by provider
This commit is contained in:
parent
c016bcc8fd
commit
afdf7f2c37
|
@ -215,7 +215,9 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe
|
|||
host += ":" + request.getEndpoint().getPort();
|
||||
}
|
||||
connection.setRequestProperty(HttpHeaders.HOST, host);
|
||||
connection.setRequestProperty(HttpHeaders.USER_AGENT, USER_AGENT);
|
||||
if (connection.getRequestProperty(HttpHeaders.USER_AGENT) == null) {
|
||||
connection.setRequestProperty(HttpHeaders.USER_AGENT, USER_AGENT);
|
||||
}
|
||||
|
||||
if (request.getPayload() != null) {
|
||||
MutableContentMetadata md = request.getPayload().getContentMetadata();
|
||||
|
|
Loading…
Reference in New Issue