logstash-input-http
logstash-input-http copied to clipboard
option to reject malformed requests
If the http input has codec => json
set, and the request does not contain valid json - there should be an option to enable rejecting this message rather than just accepting it and returning a 200 OK (current behavior).
Hello did this ever get added to the input plugin? I could really use this functionality for error checking and tests. Thanks!
I was expecting that a malformed-JSON input would have returned a non-200 code as well, so it was a bit of a surprise to see them returning 200s. I do see that I can suppress a return code, but I'd prefer to outright reject it without having to add a filter drop or a null output.
While not a plugin issue, the JSON codec will throw errors for everyone of these.
[2020-02-24T22:29:27,692][ERROR][logstash.codecs.json ][main] JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Unrecognized token 'xxxxxxxxxxxxxxxx': was expecting ('true', 'false' or 'null')
Are there plans to fix this?