Skip to content

Curl+file scheme not returns headers in PHP 7.3+ #26

@brcontainer

Description

@brcontainer

In Curl driver headers aren't returned, example:

$ch = curl_init('file:///c:/foo/bar/baz.txt');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);

$headers = curl_exec($ch);

curl_close($ch);

var_dump($headers);

In PHP 7.2 (and olders) returns:

string(88) "Content-Length: 57
Accept-ranges: bytes
Last-Modified: Sun, 29 Dec 2019 05:31:32 GMT
"

In PHP 7.3 and PHP 7.4 returns empty string:

string(0) ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions