You are here

function _services_parse_request_headers in Services 7.3

Returns all request headers.

Return value

And array with all request headers

1 call to _services_parse_request_headers()
_services_version_header_options in ./services.module
Determine if any potential versions exist as valid headers. returns false if no version is present in the header for the specific call.

File

./services.module, line 780
Provides a generic but powerful API for web services.

Code

function _services_parse_request_headers() {
  $headers = array();
  foreach ($_SERVER as $key => $value) {
    $length = 5;
    if (substr($key, 0, $length) != 'HTTP_') {
      continue;
    }
    $header = _services_fix_header_key($key, $length);
    $headers[$header] = $value;
  }
  return $headers;
}