correct handling empty body and empty content-type when POST