You are here

function _stage_file_proxy_create_headers_array in Stage File Proxy 7

Help function to generate HTTP headers for drupal_http_request.

1 call to _stage_file_proxy_create_headers_array()
stage_file_proxy_fetch_file in ./stage_file_proxy.module
Downloads a public file from the origin site.

File

./stage_file_proxy.module, line 388
Stage File Proxy Module.

Code

function _stage_file_proxy_create_headers_array($headers_string) {
  $lines = explode("\n", $headers_string);
  $headers = array();
  foreach ($lines as $line) {
    $header = explode('|', $line);
    if (count($header) > 1) {
      $headers[$header[0]] = $header[1];
    }
  }
  return $headers;
}