Added content-length checks