-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix: report SVG values without quotes #981
Conversation
Note: I think it is a very hack fix and I am not sure what we can/should to else.
returns a buffer of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked https://datatracker.ietf.org/doc/html/rfc822#appendix-A and it seems that also text/plain does not require quotes around the body, so I think we can get rid of the boolean modifier and always return the unquoted value.
Also as a solution to the issue, instead of checking if the value in input is a string and doing Buffer manipulation, why don't we do something like the following:
let body = "";
if (value !== undefined) {
if (typeof(value) === 'string') {
body = value
} else {
body = JSON.stringify(value)
}
}
always write buffer directly without quotes and simplify code
@relu91 I integrated you proposed changes. Please have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fixes #965