summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}