Changing the internal client code to use inputstream to avoid problems we had with external code