caddy
caddy copied to clipboard
replacer: `{file.*}` global placeholder strips trailing newline
Fixes https://github.com/caddyserver/caddy/issues/6392
What the heck, test failed on Windows for some reason :thinking:
replacer_test.go:445: Expected value 'foo' for key 'file.caddytest/integration/testdata/foo_with_trailing_newline.txt' got 'foo
'
replacer_test.go:445: Expected value 'foo
' for key 'file.caddytest/integration/testdata/foo_with_multiple_trailing_newlines.txt' got 'foo
'
--- FAIL: TestReplacerNew (0.01s)
Oh, Windows might have \r\n instead. That's annoying.
Sounds good to me now. To clarify, is the consensus that this is ready to merge?
Sounds good to me now. To clarify, is the consensus that this is ready to merge?
@francislavoie & @mohammed90 could you please provide feedback to @mholt on whether there is a consensus that this Pull Request is ready to merge? Thanks!