|  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
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
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 !
Your email address:
Solve the problem:
37 + 29 = ?
Subscribe to this entry?

 [2011-09-17 17:00 UTC] gordon at onlinehome dot de
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). 


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-29 23:12 UTC]
-Assigned To: +Assigned To: tyrael
 [2015-10-08 08:46 UTC]
-Status: Assigned +Status: Closed
 [2015-10-08 08:46 UTC]
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

 For Windows:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 21:01:33 2024 UTC