That's an issue with the implementation which I am fixing in my PR.
The idea here is that they wanted to have it get the contentlength using the same function as the body but not all streams can rewind so that doesn't work.
Untill that is fixed, What you should do in your thing is check if output stream is null. If so, don't actually consume your input. That is the workaround for now