this will prevent potential very large allocations due to a very large chunk size send from a client. fixes #1823