add content-length for put and post method