Added an extra check for zero-sized request body.