There's a small edge case where, if the "Content-Type: application/json" header is present and the body is empty (e.g. some GET request with leftover headers), request_validation will throw an exception.
I believe this is not expected behavior as this does not happen in other clients and libraries AFAIK.
Along with the changes I added some tests to check this edge case. I believe they are in the right place, but to be honest I had a hard time understanding how the tests were organized.
There's a small edge case where, if the
"Content-Type: application/json"
header is present and the body is empty (e.g. some GET request with leftover headers),request_validation
will throw an exception.I believe this is not expected behavior as this does not happen in other clients and libraries AFAIK.
Along with the changes I added some tests to check this edge case. I believe they are in the right place, but to be honest I had a hard time understanding how the tests were organized.