HCSVLAB-746 Fix content length header calculation for document download