function _drupal_set_preferred_header_name

8.x _drupal_set_preferred_header_name($name = NULL)

Sets the preferred name for the HTTP header.

Header names are case-insensitive, but for maximum compatibility they should follow "common form" (see RFC 2616, section 4.2).


Header handling is being shifted to a Symfony response object.

2 calls to _drupal_set_preferred_header_name()
drupal_add_http_header in drupal/core/includes/
Sets an HTTP response header for the current page.
drupal_send_headers in drupal/core/includes/
Sends the HTTP response headers that were previously set, adding defaults.


drupal/core/includes/, line 1127
Functions that need to be loaded on every Drupal request.


function _drupal_set_preferred_header_name($name = NULL) {
  static $header_names = array();

  if (!isset($name)) {
    return $header_names;
  $header_names[strtolower($name)] = $name;