|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77624 curl_getinfo() returns bad or empty entries for responses pushed via HTTP/2
Submitted: 2019-02-15 12:19 UTC Modified: -
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: nicolas dot grekas+php at gmail dot com Assigned:
Status: Open Package: cURL related
PHP Version: 7.3Git-2019-02-15 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nicolas dot grekas+php at gmail dot com
New email:
PHP Version: OS:


 [2019-02-15 12:19 UTC] nicolas dot grekas+php at gmail dot com
When calling curl_getinfo() on a pushed curl handle, the resulting entries return bad timing info, bad URL, empty primary_ip, etc.

Test script:
$mh = curl_multi_init();

curl_multi_setopt($mh, CURLMOPT_PUSHFUNCTION, $onPush = function ($p, $c, $h) {
    return CURL_PUSH_OK;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_multi_add_handle($mh, $ch);

do {
    while (CURLM_CALL_MULTI_PERFORM === curl_multi_exec($mh, $active));

    while ($info = curl_multi_info_read($mh)) {

    if (-1 === curl_multi_select($mh)) {
} while ($active);

Expected result:
entry "url" should be set to the pushed URL
entry "primary_ip" should be set to the pushing server IP
entry "starttransfer_time" should return plausible value

Actual result:
entry "url" is set to the URL of the parent response
entry "primary_ip" is empty
entry "starttransfer_time" is 0.0 or some impossible (more than 1M seconds)


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 13:01:23 2021 UTC