Skip to content

ext/curl: add support for CURLINFO_SIZE_DELIVERED (libcurl >= 8.20.0)#22408

Closed
Ayesh wants to merge 1 commit into
php:masterfrom
Ayesh:ext/curl/CURLINFO_SIZE_DELIVERED
Closed

ext/curl: add support for CURLINFO_SIZE_DELIVERED (libcurl >= 8.20.0)#22408
Ayesh wants to merge 1 commit into
php:masterfrom
Ayesh:ext/curl/CURLINFO_SIZE_DELIVERED

Conversation

@Ayesh

@Ayesh Ayesh commented Jun 23, 2026

Copy link
Copy Markdown
Member

Adds support for CURLINFO_SIZE_DELIVERED when built with libcurl >= 8.20.0.

In curl_getinfo(), the size_delivered key or the direct return value when the $option parameter is set to CURLINFO_SIZE_DELIVERED returns the number of bytes delivered.

For transfers that do not use compression (CURLOPT_ACCEPT_ENCODING), this value will be the same as CURLINFO_SIZE_DOWNLOAD. For encoded transfers, the CURLINFO_SIZE_DELIVERED value will be the uncompressed size while CURLINFO_SIZE_DOWNLOAD will be the compressed size over network.

@Ayesh Ayesh requested review from adoy and kocsismate as code owners June 23, 2026 10:21
@Ayesh Ayesh force-pushed the ext/curl/CURLINFO_SIZE_DELIVERED branch from c970eae to c678bc2 Compare June 23, 2026 10:23
@Ayesh Ayesh requested a review from devnexen June 23, 2026 10:23
@Ayesh Ayesh force-pushed the ext/curl/CURLINFO_SIZE_DELIVERED branch from c678bc2 to 53c2446 Compare June 23, 2026 11:55
Adds support for `CURLINFO_SIZE_DELIVERED`[^1] when built with libcurl
>= 8.20.0.

In `curl_getinfo()`, the `size_delivered` key or the direct return
value when the `$option` parameter is set to `CURLINFO_SIZE_DELIVERED`
returns the number of bytes delivered.

For transfers that do not use compression (`CURLOPT_ACCEPT_ENCODING`),
this value will be the same as `CURLINFO_SIZE_DOWNLOAD`. For encoded
transfers, the `CURLINFO_SIZE_DELIVERED` value will be the uncompressed
size while `CURLINFO_SIZE_DOWNLOAD` will be the compressed size over
network.

[^1]: https://github.com/curl/curl/blob/curl-8_20_0/docs/libcurl/opts/CURLINFO_SIZE_DELIVERED.md
@Ayesh Ayesh force-pushed the ext/curl/CURLINFO_SIZE_DELIVERED branch from 53c2446 to cbc72c8 Compare June 23, 2026 11:56
@Ayesh Ayesh closed this in fd8eaaf Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants