mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-11 23:03:06 -05:00
BUG/MINOR: cfgparse: Support configurations without newline at EOF
Fix parsing of configurations if the configuration file does not end with
an LF.
This patch fixes GitHub issue #704. It's a regression in
9e1758efbd which is 2.2 specific. No backport
needed.
This commit is contained in:
parent
88403266e5
commit
70f58997f4
1 changed files with 4 additions and 2 deletions
|
|
@ -1905,8 +1905,10 @@ next_line:
|
|||
|
||||
readbytes = 0;
|
||||
|
||||
/* kill trailing LF */
|
||||
*(end - 1) = 0;
|
||||
if (*(end-1) == '\n') {
|
||||
/* kill trailing LF */
|
||||
*(end - 1) = 0;
|
||||
}
|
||||
|
||||
/* skip leading spaces */
|
||||
while (isspace((unsigned char)*line))
|
||||
|
|
|
|||
Loading…
Reference in a new issue