diff options
| author | 2025-01-25 09:14:08 +0100 | |
|---|---|---|
| committer | 2025-01-25 09:14:08 +0100 | |
| commit | 22b74b0a5790360d81088a83addab1f98b7f7947 (patch) | |
| tree | 2b08182a24cef248ac7ec9bb45c375cb33eb2f55 /app/Controllers/feedController.php | |
| parent | 68497030f988cac483a67b27b96d2ac90a54856e (diff) | |
Improve cURL proxy options (#7231)
3 is now used for CURLPROXY_HTTPS2
https://github.com/curl/curl/blob/f07612cd9ae1ec50b9bedd749171ad75203c9e7e/include/curl/curl.h#L789
Related to https://github.com/FreshRSS/FreshRSS/issues/7209
Diffstat (limited to 'app/Controllers/feedController.php')
| -rwxr-xr-x | app/Controllers/feedController.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 4d64b40b5..00f321ddf 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -175,15 +175,17 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $max_redirs = Minz_Request::paramInt('curl_params_redirects'); $useragent = Minz_Request::paramString('curl_params_useragent', plaintext: true); $proxy_address = Minz_Request::paramString('curl_params', plaintext: true); - $proxy_type = Minz_Request::paramString('proxy_type', plaintext: true); + $proxy_type = Minz_Request::paramIntNull('proxy_type'); $request_method = Minz_Request::paramString('curl_method', plaintext: true); $request_fields = Minz_Request::paramString('curl_fields', plaintext: true); $headers = Minz_Request::paramTextToArray('http_headers', plaintext: true); $opts = []; - if ($proxy_type !== '') { + if ($proxy_type !== null) { + $opts[CURLOPT_PROXYTYPE] = $proxy_type; + } + if ($proxy_address !== '') { $opts[CURLOPT_PROXY] = $proxy_address; - $opts[CURLOPT_PROXYTYPE] = (int)$proxy_type; } if ($cookie !== '') { $opts[CURLOPT_COOKIE] = $cookie; |
