Support CURLOPT_ECH
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Not sure, if this is really a bug. It is more like a question if this is a bug
The following code:
<?php
$curl = curl_init('https://php.net');
curl_exec($curl);
$error = curl_getinfo($curl, CURLINFO_OS_ERRNO);
echo $error.' "'.curl_strerror($error).'"'.PHP_EOL;
curl_close($curl);
Resulted in this output (with cURL >=8.10):
101 "ECH attempted but failed"
But I expected this output instead (with cURL <8.10):
0 "No error"
Seems like a cURL issue and not an issue with the wrapper, but cURL provides the CURLOPT_ECH to configure it, which the PHP wrapper does not. So I am a bit stuck. Do I have to treat errors differently depending on the cURL version I use or is there any possibility to configure the behavior here?
The CURLOPT_ECH documentation (see above) says the default setting is off, which does not seem to be true here. Is this an issue with cURL or with the wrapper changing the default somehow?
PHP Version
PHP 8.3.12
Operating System
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PHP cURL wrapper's handling of libcurl options and the CURLOPT_ECH documentation, then reproduce the reported CURLINFO_OS_ERRNO behavior across the stated cURL versions. Determine whether the wrapper can expose this option without changing libcurl defaults. Done means ECH behavior is configurable as requested and the issue's version-dependent error behavior is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100