Skip to content

Conversation

Ayesh
Copy link
Owner

@Ayesh Ayesh commented Feb 15, 2025

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.
curl_getinfo($ch);
[
	// ...
	"used_proxy" => 0,
	"httpauth_used" => 0,
	"proxyauth_used" => 0,
]

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.

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,
]
```

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.
@Ayesh Ayesh force-pushed the master branch 2 times, most recently from a8e2e02 to cd65240 Compare March 4, 2025 18:24
@Ayesh Ayesh closed this Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant