You are here

function headers2array in Purge 7.2

Helper function to explode headers to an array

1 call to headers2array()
PurgeHandlerHttprl::execute in includes/purge.class.inc

File

includes/purge.inc, line 158
Contains the main purging functionality and error handling.

Code

function headers2array($headers) {
  $headers_array = array();
  foreach ($headers as $header) {
    $header_parts = explode(":", $header);
    $headers_array[$header_parts[0]] = $header_parts[1];
  }
  return $headers_array;
}