Forced http version and added compression

这个提交包含在:
Steven Dodd 2025-07-31 15:55:07 +01:00 提交者 GitHub
父节点 f502de6338
当前提交 36e21c2380
找不到此签名对应的密钥
GPG 密钥 ID: B5690EEEBB952194

查看文件

@ -324,7 +324,7 @@ class Qrz extends CI_Controller {
// Return the structured error array here too for consistency
return ['status' => 'error', 'message' => $error_message];
}
$url = 'http://logbook.qrz.com/api'; // Correct URL
$url = 'https://logbook.qrz.com/api'; // Correct URL
$post_data['KEY'] = $qrz_api_key; // Correct parameter
$post_data['ACTION'] = 'FETCH'; // Correct parameter
@ -338,6 +338,9 @@ class Qrz extends CI_Controller {
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true); // Correct - get response as string
curl_setopt( $ch, CURLOPT_TIMEOUT, 300); // 5 minute timeout
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 30); // 30 second connection timeout
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128000);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$content = curl_exec($ch); // Get raw content
$curl_error = curl_error($ch); // Check for cURL errors