|
18 | 18 | use PhpPkg\Http\Client\Traits\ParseRawResponseTrait; |
19 | 19 | use Toolkit\Stdlib\Arr\ArrayHelper; |
20 | 20 | use Toolkit\Stdlib\Helper\Assert; |
21 | | -use Toolkit\Stdlib\Str\UrlHelper; |
22 | 21 | use function array_merge; |
23 | 22 | use function curl_close; |
24 | 23 | use function curl_errno; |
|
46 | 45 | use const CURLAUTH_BASIC; |
47 | 46 | use const CURLE_COULDNT_CONNECT; |
48 | 47 | use const CURLE_COULDNT_RESOLVE_HOST; |
49 | | -use const CURLE_HTTP_NOT_FOUND; |
50 | 48 | use const CURLE_HTTP_POST_ERROR; |
51 | 49 | use const CURLE_OPERATION_TIMEOUTED; |
52 | 50 | use const CURLE_READ_ERROR; |
@@ -118,7 +116,7 @@ class CurlClient extends AbstractClient implements CurlClientInterface |
118 | 116 | private static array $canRetryErrorCodes = [ |
119 | 117 | CURLE_COULDNT_RESOLVE_HOST, |
120 | 118 | CURLE_COULDNT_CONNECT, |
121 | | - CURLE_HTTP_NOT_FOUND, |
| 119 | + // CURLE_HTTP_NOT_FOUND, |
122 | 120 | CURLE_READ_ERROR, |
123 | 121 | CURLE_OPERATION_TIMEOUTED, |
124 | 122 | CURLE_HTTP_POST_ERROR, |
@@ -402,7 +400,7 @@ protected function prepareRequest(string $url, mixed $data, array $headers, arra |
402 | 400 | CurlUtil::setMethodToOption($curlOptions, $method); |
403 | 401 |
|
404 | 402 | // set request url |
405 | | - $curlOptions[CURLOPT_URL] = UrlHelper::encode2($url); |
| 403 | + $curlOptions[CURLOPT_URL] = $url; |
406 | 404 |
|
407 | 405 | // append http headers |
408 | 406 | if ($headers = array_merge($this->headers, $options['headers'], $headers)) { |
|
0 commit comments