Skip to content

Commit

Permalink
reduced log level for lenient handling of missing CR at end of identi…
Browse files Browse the repository at this point in the history
…fication (#647)
  • Loading branch information
hpoettker committed Nov 24, 2020
1 parent 60aa230 commit 07d624b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ private String readIdentification(Buffer.PlainBuffer lineBuffer) throws Buffer.B
}
if (bytes[bytes.length - 2] != '\r') {
String ident = new String(bytes, 0, bytes.length - 1);
log.warn("Server identification has bad line ending, was expecting a '\\r\\n' however got: '{}' (hex: {})", (char) (bytes[bytes.length - 2] & 0xFF), Integer.toHexString(bytes[bytes.length - 2] & 0xFF));
log.warn("Will treat the identification of this server '{}' leniently", ident);
log.info("Server identification has bad line ending, was expecting a '\\r\\n' however got: '{}' (hex: {})", (char) (bytes[bytes.length - 2] & 0xFF), Integer.toHexString(bytes[bytes.length - 2] & 0xFF));
log.info("Will treat the identification of this server '{}' leniently", ident);
return ident;
// log.error("Data received up til here was: {}", new String(bytes));
// throw new TransportException("Incorrect identification: bad line ending: " + ByteArrayUtils.toHex(bytes, 0, bytes.length));
}

// Strip off the \r\n
Expand Down

0 comments on commit 07d624b

Please sign in to comment.