? 447816-form-error-indicator.patch ? 451604-rename-drupal-set-header-rev3.patch ? 477356-module-update-language.patch ? modules/search/search.module-test Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.304 diff -u -p -r1.304 bootstrap.inc --- includes/bootstrap.inc 14 Sep 2009 07:43:11 -0000 1.304 +++ includes/bootstrap.inc 15 Sep 2009 14:07:46 -0000 @@ -848,7 +848,7 @@ function drupal_load($type, $name) { * @param $append * Whether to append the value to an existing header or to replace it. */ -function drupal_set_header($name = NULL, $value = NULL, $append = FALSE) { +function drupal_add_http_header($name = NULL, $value = NULL, $append = FALSE) { // The headers as name/value pairs. $headers = &drupal_static(__FUNCTION__, array()); @@ -890,8 +890,8 @@ function drupal_set_header($name = NULL, * A string containing the header value, or FALSE if the header has been set, * or NULL if the header has not been set. */ -function drupal_get_header($name = NULL) { - $headers = drupal_set_header(); +function drupal_get_http_header($name = NULL) { + $headers = drupal_add_http_header(); if (isset($name)) { $name = strtolower($name); return isset($headers[$name]) ? $headers[$name] : NULL; @@ -915,9 +915,9 @@ function _drupal_set_preferred_header_na } /** - * Send the HTTP response headers previously set using drupal_set_header(). + * Send the HTTP response headers previously set using drupal_add_http_header(). * Add default headers, unless they have been replaced or unset using - * drupal_set_header(). + * drupal_add_http_header(). * * @param $default_headers * An array of headers as name/value pairs. @@ -926,7 +926,7 @@ function _drupal_set_preferred_header_na */ function drupal_send_headers($default_headers = array(), $only_default = FALSE) { $headers_sent = &drupal_static(__FUNCTION__, FALSE); - $headers = drupal_get_header(); + $headers = drupal_get_http_header(); if ($only_default && $headers_sent) { $headers = array(); } @@ -999,7 +999,7 @@ function drupal_page_header() { * * The headers allow as much as possible in proxies and browsers without any * particular knowledge about the pages. Modules can override these headers - * using drupal_set_header(). + * using drupal_add_http_header(). * * If the request is conditional (using If-Modified-Since and If-None-Match), * and the conditions match those currently in the cache, a 304 Not Modified @@ -1011,10 +1011,10 @@ function drupal_serve_page_from_cache(st $return_compressed = $page_compression && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE; // Get headers set in hook_boot(). Keys are lower-case. - $hook_boot_headers = drupal_get_header(); + $hook_boot_headers = drupal_get_http_header(); // Headers generated in this function, that may be replaced or unset using - // drupal_set_headers(). Keys are mixed-case. + // drupal_add_http_headers(). Keys are mixed-case. $default_headers = array(); foreach ($cache->headers as $name => $value) { @@ -1023,7 +1023,7 @@ function drupal_serve_page_from_cache(st // headers set in hook_boot(). $name_lower = strtolower($name); if (in_array($name_lower, array('content-location', 'expires', 'cache-control', 'vary')) && !isset($hook_boot_headers[$name_lower])) { - drupal_set_header($name, $value); + drupal_add_http_header($name, $value); unset($cache->headers[$name]); } } @@ -1055,7 +1055,7 @@ function drupal_serve_page_from_cache(st // Send the remaining headers. foreach ($cache->headers as $name => $value) { - drupal_set_header($name, $value); + drupal_add_http_header($name, $value); } $default_headers['Last-Modified'] = gmdate(DATE_RFC1123, $cache->created); Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.988 diff -u -p -r1.988 common.inc --- includes/common.inc 11 Sep 2009 15:12:29 -0000 1.988 +++ includes/common.inc 15 Sep 2009 14:07:48 -0000 @@ -456,7 +456,7 @@ function drupal_goto($path = '', $query */ function drupal_site_offline() { drupal_maintenance_theme(); - drupal_set_header('503 Service unavailable'); + drupal_add_http_header('503 Service unavailable'); drupal_set_title(t('Site under maintenance')); print theme('maintenance_page', filter_xss_admin(variable_get('maintenance_mode_message', t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))))); @@ -466,7 +466,7 @@ function drupal_site_offline() { * Generates a 404 error if the request can not be handled. */ function drupal_not_found() { - drupal_set_header('404 Not Found'); + drupal_add_http_header('404 Not Found'); watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); @@ -498,7 +498,7 @@ function drupal_not_found() { * Generates a 403 error if the request is not allowed. */ function drupal_access_denied() { - drupal_set_header('403 Forbidden'); + drupal_add_http_header('403 Forbidden'); watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); // Keep old path for reference, and to allow forms to redirect to it. @@ -947,7 +947,7 @@ function _drupal_log_error($error, $fata } if ($fatal) { - drupal_set_header('500 Service unavailable (with message)'); + drupal_add_http_header('500 Service unavailable (with message)'); } if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { @@ -3221,7 +3221,7 @@ function drupal_get_js($scope = 'header' * callback function and each value an array of arguments. For example: * * @code - * $build['#attached']['drupal_set_header'] = array( + * $build['#attached']['drupal_add_http_header'] = array( * array('Content-Type', 'application/rss+xml; charset=utf-8'), * ); * @endcode @@ -3599,7 +3599,7 @@ function drupal_to_js($var) { */ function drupal_json($var = NULL) { // We are returning JavaScript, so tell the browser. - drupal_set_header('Content-Type', 'text/javascript; charset=utf-8'); + drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8'); if (isset($var)) { echo drupal_to_js($var); @@ -3744,7 +3744,7 @@ function _drupal_bootstrap_full() { set_exception_handler('_drupal_exception_handler'); // Emit the correct charset HTTP header. - drupal_set_header('Content-Type', 'text/html; charset=utf-8'); + drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); // Detect string handling method unicode_check(); // Undo magic quotes @@ -3796,9 +3796,9 @@ function drupal_page_set_cache() { ); // Restore preferred header names based on the lower-case names returned - // by drupal_get_header(). + // by drupal_get_http_header(). $header_names = _drupal_set_preferred_header_name(); - foreach (drupal_get_header() as $name_lower => $value) { + foreach (drupal_get_http_header() as $name_lower => $value) { $cache->headers[$header_names[$name_lower]] = $value; } Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.190 diff -u -p -r1.190 file.inc --- includes/file.inc 31 Aug 2009 05:47:33 -0000 1.190 +++ includes/file.inc 15 Sep 2009 14:07:49 -0000 @@ -1502,7 +1502,7 @@ function file_transfer($uri, $headers) { } foreach ($headers as $name => $value) { - drupal_set_header($name, $value); + drupal_add_http_header($name, $value); } drupal_send_headers(); $scheme = file_uri_scheme($uri); Index: includes/theme.maintenance.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.maintenance.inc,v retrieving revision 1.40 diff -u -p -r1.40 theme.maintenance.inc --- includes/theme.maintenance.inc 11 Sep 2009 13:56:56 -0000 1.40 +++ includes/theme.maintenance.inc 15 Sep 2009 14:07:49 -0000 @@ -119,7 +119,7 @@ function theme_task_list($items, $active * The page content to show. */ function theme_install_page($content) { - drupal_set_header('Content-Type', 'text/html; charset=utf-8'); + drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); // Assign content. $variables['content'] = $content; @@ -176,7 +176,7 @@ function theme_install_page($content) { */ function theme_update_page($content, $show_messages = TRUE) { // Set required headers. - drupal_set_header('Content-Type', 'text/html; charset=utf-8'); + drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); // Assign content and show message flag. $variables['content'] = $content; Index: includes/xmlrpcs.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/xmlrpcs.inc,v retrieving revision 1.31 diff -u -p -r1.31 xmlrpcs.inc --- includes/xmlrpcs.inc 24 Aug 2009 00:14:19 -0000 1.31 +++ includes/xmlrpcs.inc 15 Sep 2009 14:07:49 -0000 @@ -106,8 +106,8 @@ function xmlrpc_server_error($error, $me function xmlrpc_server_output($xml) { $xml = '' . "\n" . $xml; - drupal_set_header('Content-Length', strlen($xml)); - drupal_set_header('Content-Type', 'text/xml'); + drupal_add_http_header('Content-Length', strlen($xml)); + drupal_add_http_header('Content-Type', 'text/xml'); echo $xml; exit; } Index: includes/database/database.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database/database.inc,v retrieving revision 1.75 diff -u -p -r1.75 database.inc --- includes/database/database.inc 10 Sep 2009 06:38:16 -0000 1.75 +++ includes/database/database.inc 15 Sep 2009 14:07:50 -0000 @@ -2453,7 +2453,7 @@ function _db_error_page($error = '') { global $db_type; drupal_language_initialize(); drupal_maintenance_theme(); - drupal_set_header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); + drupal_add_http_header($_SERVER['SERVER_PROTOCOL'] . ' 503 Service Unavailable'); drupal_set_title('Site offline'); } Index: modules/aggregator/aggregator.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v retrieving revision 1.32 diff -u -p -r1.32 aggregator.pages.inc --- modules/aggregator/aggregator.pages.inc 24 Aug 2009 17:11:42 -0000 1.32 +++ modules/aggregator/aggregator.pages.inc 15 Sep 2009 14:07:50 -0000 @@ -369,7 +369,7 @@ function aggregator_page_rss() { * @ingroup themeable */ function theme_aggregator_page_rss($feeds, $category = NULL) { - drupal_set_header('Content-Type', 'application/rss+xml; charset=utf-8'); + drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8'); $items = ''; $feed_length = variable_get('feed_item_length', 'teaser'); @@ -429,7 +429,7 @@ function aggregator_page_opml($cid = NUL * @ingroup themeable */ function theme_aggregator_page_opml($feeds) { - drupal_set_header('Content-Type', 'text/xml; charset=utf-8'); + drupal_add_http_header('Content-Type', 'text/xml; charset=utf-8'); $output = "\n"; $output .= "\n"; Index: modules/aggregator/tests/aggregator_test.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/tests/aggregator_test.module,v retrieving revision 1.3 diff -u -p -r1.3 aggregator_test.module --- modules/aggregator/tests/aggregator_test.module 27 May 2009 18:33:54 -0000 1.3 +++ modules/aggregator/tests/aggregator_test.module 15 Sep 2009 14:07:50 -0000 @@ -33,21 +33,21 @@ function aggregator_test_feed($use_last_ // Send appropriate response. We respond with a 304 not modified on either // etag or on last modified. if ($use_last_modified) { - drupal_set_header('Last-Modified', gmdate(DATE_RFC1123, $last_modified)); + drupal_add_http_header('Last-Modified', gmdate(DATE_RFC1123, $last_modified)); } if ($use_etag) { - drupal_set_header('ETag', $etag); + drupal_add_http_header('ETag', $etag); } // Return 304 not modified if either last modified or etag match. if ($last_modified == $if_modified_since || $etag == $if_none_match) { - drupal_set_header('304 Not Modified'); + drupal_add_http_header('304 Not Modified'); return; } // The following headers force validation of cache: - drupal_set_header('Expires', 'Sun, 19 Nov 1978 05:00:00 GMT'); - drupal_set_header('Cache-Control', 'must-revalidate'); - drupal_set_header('Content-Type', 'application/rss+xml; charset=utf-8'); + drupal_add_http_header('Expires', 'Sun, 19 Nov 1978 05:00:00 GMT'); + drupal_add_http_header('Cache-Control', 'must-revalidate'); + drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8'); // Read actual feed from file. $file_name = DRUPAL_ROOT . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_rss091.xml'; Index: modules/image/image.module =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.module,v retrieving revision 1.16 diff -u -p -r1.16 image.module --- modules/image/image.module 26 Aug 2009 03:20:39 -0000 1.16 +++ modules/image/image.module 15 Sep 2009 14:07:51 -0000 @@ -453,8 +453,8 @@ function image_style_generate() { if (!$lock_acquired) { // Tell client to retry again in 3 seconds. Currently no browsers are known // to support Retry-After. - drupal_set_header('503 Service Unavailable'); - drupal_set_header('Retry-After', 3); + drupal_add_http_header('503 Service Unavailable'); + drupal_add_http_header('Retry-After', 3); print t('Image generation in progress, please try again shortly.'); exit(); } @@ -474,7 +474,7 @@ function image_style_generate() { } else { watchdog('image', 'Unable to generate the derived image located at %path.', $destination); - drupal_set_header('500 Internal Server Error'); + drupal_add_http_header('500 Internal Server Error'); print t('Error generating image.'); exit(); } Index: modules/openid/tests/openid_test.module =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/tests/openid_test.module,v retrieving revision 1.3 diff -u -p -r1.3 openid_test.module --- modules/openid/tests/openid_test.module 10 Jun 2009 20:13:20 -0000 1.3 +++ modules/openid/tests/openid_test.module 15 Sep 2009 14:07:51 -0000 @@ -69,7 +69,7 @@ function openid_test_menu() { */ function openid_test_yadis_xrds() { if ($_SERVER['HTTP_ACCEPT'] == 'application/xrds+xml') { - drupal_set_header('Content-Type', 'application/xrds+xml'); + drupal_add_http_header('Content-Type', 'application/xrds+xml'); print ' @@ -89,7 +89,7 @@ function openid_test_yadis_xrds() { * Menu callback; regular HTML page with an X-XRDS-Location HTTP header. */ function openid_test_yadis_x_xrds_location() { - drupal_set_header('X-XRDS-Location', url('openid-test/yadis/xrds', array('absolute' => TRUE))); + drupal_add_http_header('X-XRDS-Location', url('openid-test/yadis/xrds', array('absolute' => TRUE))); return t('This page includes an X-RDS-Location HTTP header containing the URL of an XRDS document.'); } @@ -181,7 +181,7 @@ function _openid_test_endpoint_associate // Respond to Relying Party in the special Key-Value Form Encoding (see OpenID // Authentication 1.0, section 4.1.1). - drupal_set_header('Content-Type', 'text/plain'); + drupal_add_http_header('Content-Type', 'text/plain'); print _openid_create_message($response); } @@ -228,6 +228,6 @@ function _openid_test_endpoint_authentic // Put the signed message into the query string of a URL supplied by the // Relying Party, and redirect the user. - drupal_set_header('Content-Type', 'text/plain'); + drupal_add_http_header('Content-Type', 'text/plain'); header('Location: ' . url($_REQUEST['openid_return_to'], array('query' => http_build_query($response, '', '&'), 'external' => TRUE))); } Index: modules/simpletest/tests/browser_test.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/browser_test.module,v retrieving revision 1.1 diff -u -p -r1.1 browser_test.module --- modules/simpletest/tests/browser_test.module 17 Aug 2009 06:08:47 -0000 1.1 +++ modules/simpletest/tests/browser_test.module 15 Sep 2009 14:07:51 -0000 @@ -71,7 +71,7 @@ function browser_test_refresh_meta() { function browser_test_refresh_header() { if (!isset($_GET['refresh'])) { $url = url('browser_test/refresh/header', array('absolute' => TRUE, 'query' => 'refresh=true')); - drupal_set_header('Location', $url); + drupal_add_http_header('Location', $url); return ''; } echo 'Refresh successful'; Index: modules/simpletest/tests/system_test.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/tests/system_test.module,v retrieving revision 1.15 diff -u -p -r1.15 system_test.module --- modules/simpletest/tests/system_test.module 17 Aug 2009 20:32:30 -0000 1.15 +++ modules/simpletest/tests/system_test.module 15 Sep 2009 14:07:51 -0000 @@ -96,7 +96,7 @@ function system_test_redirect($code) { } function system_test_set_header() { - drupal_set_header($_GET['name'], $_GET['value']); + drupal_add_http_header($_GET['name'], $_GET['value']); return t('The following header was set: %name: %value', array('%name' => $_GET['name'], '%value' => $_GET['value'])); } Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.789 diff -u -p -r1.789 system.module --- modules/system/system.module 11 Sep 2009 02:14:20 -0000 1.789 +++ modules/system/system.module 15 Sep 2009 14:07:53 -0000 @@ -3002,7 +3002,7 @@ function theme_meta_generator_html($vers * @ingroup themeable */ function theme_meta_generator_header($version = VERSION) { - drupal_set_header('X-Generator', 'Drupal ' . $version . ' (http://drupal.org)'); + drupal_add_http_header('X-Generator', 'Drupal ' . $version . ' (http://drupal.org)'); } /** @@ -3096,7 +3096,7 @@ function system_run_cron_image() { // Output a transparent 1x1 image to the browser; required for clients not // supporting JavaScript. - drupal_set_header('Content-Type', 'image/gif'); + drupal_add_http_header('Content-Type', 'image/gif'); echo "\x47\x49\x46\x38\x39\x61\x1\x0\x1\x0\x80\xff\x0\xc0\xc0\xc0\x0\x0\x0\x21\xf9\x4\x1\x0\x0\x0\x0\x2c\x0\x0\x0\x0\x1\x0\x1\x0\x0\x2\x2\x44\x1\x0\x3b"; // Cron threshold semaphore is used to avoid errors every time the image