diff --git a/authcache.helpers.inc b/authcache.helpers.inc.new
index 89784c7..1014c6f 100644
--- a/authcache.helpers.inc
+++ b/authcache.helpers.inc
@@ -342,7 +342,7 @@ function _authcache_get_http_status($default = 200) {
 
 function _authcache_get_http_header($regex, $default = NULL) {
   // The last header is the one that counts:
-  $headers = preg_grep($regex, explode("\n", drupal_set_header()));
+  $headers = preg_grep($regex, explode("\n", drupal_get_headers()));
   if (!empty($headers) && preg_match($regex, array_pop($headers), $matches)) {
     return $matches[1]; // found it
   }
