summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 9c2e4bad2..299f9059f 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -308,6 +308,9 @@ function drupal_initialize_variables() {
if (!isset($_SERVER['HTTP_REFERER'])) {
$_SERVER['HTTP_REFERER'] = '';
}
+ if (!isset($_SERVER['SERVER_PROTOCOL']) || ($_SERVER['SERVER_PROTOCOL'] != 'HTTP/1.0' && $_SERVER['SERVER_PROTOCOL'] != 'HTTP/1.1')) {
+ $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
+ }
}
/**
@@ -640,7 +643,7 @@ function drupal_page_cache_header($cache) {
if ($if_modified_since && $if_none_match
&& $if_none_match == $etag // etag must match
&& $if_modified_since == $last_modified) { // if-modified-since must match
- header('HTTP/1.1 304 Not Modified');
+ header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
// All 304 responses must send an etag if the 200 response for the same object contained an etag
header("Etag: $etag");
exit();
@@ -1020,7 +1023,7 @@ function _drupal_bootstrap($phase) {
case DRUPAL_BOOTSTRAP_ACCESS:
// Deny access to blocked IP addresses - t() is not yet available.
if (drupal_is_denied(ip_address())) {
- header('HTTP/1.1 403 Forbidden');
+ header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
print 'Sorry, ' . check_plain(ip_address()) . ' has been banned.';
exit();
}