When using the VFS with swift and --swift-no-chunk, PutStream was returning objects with size -1 which was causing corrupted transfer messages. This was fixed by counting the bytes transferred in a streamed file and updating the metadata with that.