php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #55716 Add an option to pass a custom stream context to get_headers
Submitted: 2011-09-17 17:00 UTC Modified: 2015-10-08 08:46 UTC
Votes:23
Avg. Score:4.3 ± 0.9
Reproduced:23 of 23 (100.0%)
Same Version:6 (26.1%)
Same OS:20 (87.0%)
From: gordon at onlinehome dot de Assigned: tyrael
Status: Closed Package: Streams related
PHP Version: 5.4.0beta1 OS: any
Private report: No CVE-ID:
 [2011-09-17 17:00 UTC] gordon at onlinehome dot de
Description:
------------
This get_headers() function uses the default stream context, which can be set/changed with the stream_context_get_default() function. This is sometimes undesirable because the default context will be used for any subsequent uses as well. Please provide an optional third argument to the get_headers() function to allow setting of a custom stream context (just like file_get_contents has). 



Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-29 23:12 UTC] tyrael@php.net
-Assigned To: +Assigned To: tyrael
 [2015-10-08 08:46 UTC] tyrael@php.net
-Status: Assigned +Status: Closed
 [2015-10-08 08:46 UTC] tyrael@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

fixed it in master, expected to be released in php 7.1.0
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sat Apr 29 17:01:36 2017 UTC