Commit 983eda44 authored by Dries's avatar Dries

- Patch #104693 by ChrisKennedy: send proper HTTP headers: HTTP/1.0 -> HTTP/1.1.

parent d5fb9a23
......@@ -800,7 +800,7 @@ function _drupal_bootstrap($phase) {
case DRUPAL_BOOTSTRAP_ACCESS:
// Deny access to hosts which were banned - t() is not yet available.
if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
header('HTTP/1.0 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.';
exit();
}
......
......@@ -320,7 +320,7 @@ function drupal_goto($path = '', $query = NULL, $fragment = NULL, $http_response
* Generates a site off-line message
*/
function drupal_site_offline() {
drupal_set_header('HTTP/1.0 503 Service unavailable');
drupal_set_header('HTTP/1.1 503 Service unavailable');
drupal_set_title(t('Site off-line'));
print theme('maintenance_page', filter_xss_admin(variable_get('site_offline_message',
t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))))));
......@@ -330,7 +330,7 @@ function drupal_site_offline() {
* Generates a 404 error if the request can not be handled.
*/
function drupal_not_found() {
drupal_set_header('HTTP/1.0 404 Not Found');
drupal_set_header('HTTP/1.1 404 Not Found');
watchdog('page not found', check_plain($_GET['q']), WATCHDOG_WARNING);
......@@ -360,7 +360,7 @@ function drupal_not_found() {
* Generates a 403 error if the request is not allowed.
*/
function drupal_access_denied() {
drupal_set_header('HTTP/1.0 403 Forbidden');
drupal_set_header('HTTP/1.1 403 Forbidden');
watchdog('access denied', check_plain($_GET['q']), WATCHDOG_WARNING);
// Keep old path for reference
......@@ -454,7 +454,7 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
$defaults[$header] = $header .': '. $value;
}
$request = $method .' '. $path ." HTTP/1.0\r\n";
$request = $method .' '. $path ." HTTP/1.1\r\n";
$request .= implode("\r\n", $defaults);
$request .= "\r\n\r\n";
if ($data) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment