function _background_process_filter_headers in Background Process 8
Same name and namespace in other branches
- 6 background_process.module \_background_process_filter_headers()
- 7.2 background_process.http.inc \_background_process_filter_headers()
- 7 background_process.module \_background_process_filter_headers()
Remove headers we do not wish to pass on to the next request.
1 call to _background_process_filter_headers()
- background_process_build_request in ./
background_process.module - Implements to Build url and headers for http request.
File
- ./
background_process.module, line 1344 - This module implements a framework for calling funtions in the background.
Code
function _background_process_filter_headers($headers) {
$result = [];
if (empty($headers)) {
return $result;
}
foreach ($headers as $key => $value) {
if (!preg_match('/^(Connection|Keep-Alive|Proxy-Authenticate|Proxy-Authorization|TE|Trailers|Transfer-Encoding|Upgrade|Set-Cookie|Content-Length|Host|Accept-Encoding)$/i', $key)) {
$result[$key] = $value;
}
}
return $result;
}