summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-03-30 12:18:42 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-03-30 12:18:42 -0400
commit20a45b1117e28f4458fd72de81eb8ec0173d9b99 (patch)
tree20ec5e8ed302c320b77300e19ce11cf221b61a49
parenta16de0db6608f8cd71ac9da475b4cd3d01600f12 (diff)
downloadbrdo-20a45b1117e28f4458fd72de81eb8ec0173d9b99.tar.gz
brdo-20a45b1117e28f4458fd72de81eb8ec0173d9b99.tar.bz2
Issue #1605040 by TravisCarden, mitron | EdgarPE: Fixed drupal_send_headers() ignores headers with valid but falsy values.
-rw-r--r--CHANGELOG.txt4
-rw-r--r--includes/bootstrap.inc2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index dac2e19a4..71dc76988 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,10 @@
Drupal 7.22, xxxx-xx-xx (development version)
-----------------------
+- Fixed a bug which prevented empty HTTP headers (such as "0") from being set.
+ (Minor behavior change: Callers of drupal_add_http_header() must now set
+ FALSE explicitly to prevent a header from being sent at all; this was already
+ indicated in the function's documentation.)
- Fixed OpenID errors when more than one module implements hook_openid(). The
behavior is now changed so that if more than one module tries to set the same
parameter, the last module's change takes effect.
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index c6c98ecb6..acda75146 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1212,7 +1212,7 @@ function drupal_send_headers($default_headers = array(), $only_default = FALSE)
header($_SERVER['SERVER_PROTOCOL'] . ' ' . $value);
}
// Skip headers that have been unset.
- elseif ($value) {
+ elseif ($value !== FALSE) {
header($header_names[$name_lower] . ': ' . $value);
}
}