Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new line by the end of error messages #227

Open
zimmerle opened this issue Mar 9, 2020 · 3 comments
Open

new line by the end of error messages #227

zimmerle opened this issue Mar 9, 2020 · 3 comments

Comments

@zimmerle
Copy link

zimmerle commented Mar 9, 2020

Is it correct to expect that all error messages will end with a new line?

In my use case scenario, the new line could be very annoying as reported here: owasp-modsecurity/ModSecurity#2278 (comment)

I understand that chomp is an option. However, I don't want to remove something that is eventually valid.

@robohack
Copy link

robohack commented Mar 9, 2020

The trailing newline has always appeared on all error messages returned by yajl_get_error(), or at least has since 2007. If you set the verbose flag you even get multiple lines.

@jeremyjpj0916
Copy link

Should such a trailing newline be removed or are there concerns there? Or should clients of this library parse around it and handle the format themselves?

@robohack
Copy link

robohack commented May 7, 2020

As I said, the newlines are there on purpose as multiline messages are possible and necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants