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 (profile)
Status: Closed Package: Streams related
PHP Version: 5.4.0beta1 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gordon at onlinehome dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

Pull requests:

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-2025 The PHP Group
All rights reserved.
Last updated: Mon Mar 31 07:01:29 2025 UTC