Skip to content

Commit 275abf7

Browse files
committed
[DE-435] renamed user agent header
1 parent 872aa02 commit 275abf7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

driver/src/main/java/com/arangodb/internal/http/HttpConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class HttpConnection implements Connection {
7070
private static final Logger LOGGER = LoggerFactory.getLogger(HttpConnection.class);
7171
private static final String CONTENT_TYPE_APPLICATION_JSON_UTF8 = "application/json; charset=utf-8";
7272
private static final String CONTENT_TYPE_VPACK = "application/x-velocypack";
73-
private static final String USER_AGENT = "ArangoDB-JavaDriver/" + PackageVersion.VERSION;
73+
private static final String USER_AGENT = "JavaDriver/" + PackageVersion.VERSION;
7474
private static final AtomicInteger THREAD_COUNT = new AtomicInteger();
7575
private final InternalSerde util;
7676
private final ContentType contentType;
@@ -248,7 +248,7 @@ public void doExecute(final InternalRequest request, final CompletableFuture<Int
248248
}
249249
addHeader(request, httpRequest);
250250
httpRequest.putHeader(HttpHeaders.AUTHORIZATION.toString(), auth);
251-
httpRequest.putHeader(HttpHeaders.USER_AGENT.toString(), USER_AGENT);
251+
httpRequest.putHeader("x-arango-driver", USER_AGENT);
252252

253253
byte[] reqBody = request.getBody();
254254
Buffer buffer;

driver/src/test/java/com/arangodb/PackageVersionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void userAgentHeader(Protocol protocol) {
4343
.method(Request.Method.GET)
4444
.path("/_admin/echo")
4545
.build(), JsonNode.class);
46-
assertThat(resp.getBody().get("headers").get("user-agent").textValue()).endsWith(PackageVersion.VERSION);
46+
assertThat(resp.getBody().get("headers").get("x-arango-driver").textValue()).endsWith(PackageVersion.VERSION);
4747
adb.shutdown();
4848
}
4949
}

0 commit comments

Comments
 (0)