Tilde in filename is breaking auth due to the PHP rawurlencode() not encoding them following RFC3986