take 2 on setting content-length properly