fix #27 - make sure content-length is an int before trying to add the length of the insert.