Set length and encoding properly when HEAD response