ext/curl: Add CURLINFO_{USED_PROXY,HTTPAUTH_USED,PROXYAUTH_USED}#17816
ext/curl: Add CURLINFO_{USED_PROXY,HTTPAUTH_USED,PROXYAUTH_USED}#17816Ayesh merged 1 commit intophp:masterfrom
CURLINFO_{USED_PROXY,HTTPAUTH_USED,PROXYAUTH_USED}#17816Conversation
29a3b7d to
f6eccf2
Compare
|
Thank you @devnexen - I couldn't think of a way to test it with a local server. That said, we don't seem to be testing a lot of proxy/auth related features, nor any of the HTTP/2, HTTP/3, DoH, etc features either, so the online test is understandably a bit out of place. If it makes more sense, I can remove the online test. |
|
Can we use Caddy instead of the online test? Caddy was introduced via #10669, and is used for a couple of tests (some jobs are actually running that). |
1c47f1d to
47a8e73
Compare
|
Thank you @cmb69. I pushed removing httpbin, and with a new |
cmb69
left a comment
There was a problem hiding this comment.
[…] but GH-Actions run will get skipped because the Curl version is older than 8.12.0.
It would be good to also have a job using recent cURL; possibly on Windows, since we're rather up to date there (at least for the master branch), but this is a separate issue.
Please see my comment below; I guess that should solve the Windows CI failure.
19b93c4 to
7eebe32
Compare
Adds support for `curl_getinfo()` info keys and additional array keys: - [`CURLINFO_USED_PROXY`](https://curl.se/libcurl/c/CURLINFO_USED_PROXY.html) - `libcurl` >= 8.7.9 - Zero if no proxy was used in the previous transfer or a non-zero value if a proxy was used. - [`CURLINFO_HTTPAUTH_USED`](https://github.com/curl/curl/blob/curl-8_12_0/docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md) - `libcurl` >= 8.7.9 - Bitmask indicating the authentication method that was used in the previous HTTP request. - [`CURLINFO_PROXYAUTH_USED`](https://github.com/curl/curl/blob/curl-8_12_0/docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md) - `libcurl` >= 8.12.0 - Bitmask indicating the authentication method that was used in the previous request done over an HTTP proxy. ```php curl_getinfo($ch); ``` ```php [ // ... "used_proxy" => 0, "httpauth_used" => 0, "proxyauth_used" => 0, ] ``` This also updates the `Caddyfile` for curl tests to add a new route that supports HTTP basic auth.
7eebe32 to
6a31992
Compare
Adds support for
curl_getinfo()info keys and additional array keys:CURLINFO_USED_PROXY-libcurl>= 8.7.9 - Zero if no proxy was used in the previous transfer or a non-zero value if a proxy was used.CURLINFO_HTTPAUTH_USED-libcurl>= 8.7.9 - Bitmask indicating the authentication method that was used in the previous HTTP request.CURLINFO_PROXYAUTH_USED-libcurl>= 8.12.0 - Bitmask indicating the authentication method that was used in the previous request done over an HTTP proxy.Because the built-in server ext/curl tests use does not support HTTP authentication, there is an online test that uses httpbin. It will be skipped by default unless online tests are run.