Skip to content

Commit eced01f

Browse files
author
Mark
committed
velocystream accept header
1 parent c7eaa07 commit eced01f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/java/com/arangodb/internal/velocystream/Connection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
public abstract class Connection {
5050

5151
private static final Logger LOGGER = LoggerFactory.getLogger(Connection.class);
52+
private static final byte[] ACCEPT_HEADER = ByteBuffer.wrap("VST/1.0\r\n\r\n".getBytes())
53+
.order(ByteOrder.LITTLE_ENDIAN).array();
5254

5355
private final String host;
5456
private final Integer port;
@@ -109,6 +111,7 @@ public synchronized void open() throws IOException {
109111
}
110112
((SSLSocket) socket).startHandshake();
111113
}
114+
sendAcceptHeader();
112115
}
113116

114117
public synchronized void close() {
@@ -124,6 +127,11 @@ public synchronized void close() {
124127
}
125128
}
126129

130+
private void sendAcceptHeader() throws IOException {
131+
outputStream.write(ACCEPT_HEADER);
132+
outputStream.flush();
133+
}
134+
127135
protected synchronized void writeIntern(final Message message, final Collection<Chunk> chunks) {
128136
for (final Chunk chunk : chunks) {
129137
try {

src/test/resources/logback-test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</encoder>
99
</appender>
1010

11-
<root level="info">
11+
<root level="debug">
1212
<appender-ref ref="STDOUT" />
1313
</root>
1414
</configuration>

0 commit comments

Comments
 (0)