Commit 051e867
Accept syslog dates with leading 0 (#27775)
This makes the RFC3164 parser accept dates with a leading 0. This makes the parser a little more liberal than the spec.
From RFC3164 https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.2
If the day of the month is less than 10, then it MUST be represented as a space and then the number. For example, the 7th day of August would be represented as "Aug 7", with two spaces between the "g" and the "7".
So now it will accept both `Sep 01` and `Sep 1`.
(cherry picked from commit e66b4e6)1 parent f5dceab commit 051e867
4 files changed
Lines changed: 383 additions & 343 deletions
File tree
- filebeat/input/syslog
- parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments