From 4ed30eefb1408c85a1fa5afeee329525556df461 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 15 Feb 2004 15:57:55 +0000 Subject: - Bug #5684: filter duplicate headers. --- includes/bootstrap.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 2cfbdacb7..51f0260ee 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -137,7 +137,18 @@ function drupal_page_header() { // Send appropriate response: header("Last-Modified: $date"); header("ETag: $etag"); - header($cache->headers); + + /* + ** Send the original request's headers. We send them one after + ** another so PHP's header() function can deal with duplicate + ** headers. + */ + + $headers = explode('\n', $cache->headers); + foreach ($headers as $header) { + header($header); + } + print $cache->data; /* -- cgit v1.2.3