Fix potential crash when parsing POST requests without Content-Length header