tests: Use CURLOPT_READDATA instead of the obsolete CURLOPT_INFILE