calculate response length as a Buffer so non ascii chars are counted properly