Fix for '411 Length Required' error when sending a POST request