set content-length on zero length payload

fix issue #1297 put with zero length payload

previous code set content-length when there was no payload.  This addresses the scenario where there is a payload, but it is zero length.