change - make putBuffer use actual buffer length rather than character length to ensure correct Content-Length