|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77497 Empty reponse with H2 server push and timeout
Submitted: 2019-01-21 18:16 UTC Modified: 2019-01-21 19:57 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tobias dot nyholm at gmail dot com Assigned:
Status: Open Package: cURL related
PHP Version: 7.3Git-2019-01-21 (Git) OS: Alpine
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
42 - 23 = ?
Subscribe to this entry?

 [2019-01-21 18:16 UTC] tobias dot nyholm at gmail dot com
Follow up from

When I use cUrl h2 push functionality and timeouts I get a crash. 

Test script:

$transfers = 1;
$callback = function($parent, $passed) use (&$transfers) {
    curl_setopt($passed, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
        echo "Received ".strlen($data)."\n";
        return strlen($data);
    return CURL_PUSH_OK;
$mh = curl_multi_init();
curl_multi_setopt($mh, CURLMOPT_PUSHFUNCTION, $callback);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_HTTP_VERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// FIXME, this line crashes everything. Without it, everything is fine. 
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_multi_add_handle($mh, $ch);
$active = null;
do {
    $status = curl_multi_exec($mh, $active);
    do {
        $info = curl_multi_info_read($mh);
        if (false !== $info && $info['msg'] == CURLMSG_DONE) {
            $handle = $info['handle'];
            if ($handle !== null) {
                curl_multi_remove_handle($mh, $handle);
    } while ($info);
} while ($transfers);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-21 19:57 UTC] tobias dot nyholm at gmail dot com
-Summary: Segfault with H2 server push and timeout +Summary: Empty reponse with H2 server push and timeout
 [2019-01-21 19:57 UTC] tobias dot nyholm at gmail dot com
Correction: No segfault, just empty responses.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 03:01:28 2024 UTC