Details
-
Type: Bug
-
Status: Closed
-
Priority: High
-
Resolution: Fixed
-
Affects Version/s: 1.0.0
-
Fix Version/s: 1.0.1
-
Labels:None
-
Sprint:2017 - S2
-
Story Points:4
Description
Currently, SyslogDecoder decode byte message into a String using system default encoding, which is a bad java practice. At least US-ASCII decoding should be used.
However it might not be sufficient: According to RFC5424, the header must always be encoded in US-ASCII but the message could be either encoded in US-ASCII or UTF-8. So decoding the whole syslog frame without knowing the message format is a mistake.
The current implementation must be rework because it cannot solve the probleme easily: the current RFC5424 parser (who is responsible to parse the header content) take a String as argument, so the frame must have been previously decoded... And it is not possible to know how to decode before having parsed the header...
However it might not be sufficient: According to RFC5424, the header must always be encoded in US-ASCII but the message could be either encoded in US-ASCII or UTF-8. So decoding the whole syslog frame without knowing the message format is a mistake.
The current implementation must be rework because it cannot solve the probleme easily: the current RFC5424 parser (who is responsible to parse the header content) take a String as argument, so the frame must have been previously decoded... And it is not possible to know how to decode before having parsed the header...