Commit a0671877 authored by Dries's avatar Dries

- Patch #8509 by Killes and Steven: added support for sending compressed
  pages.  Useful to reduce your site's bandwidth.
parent 56fa37cb
......@@ -27,9 +27,13 @@ Drupal x.x.x, xxxx-xx-xx
* added 'categories' block.
- blogger API:
* added support for auto-discovery of blogger API via RSD.
- performance:
* added support for sending gzip compressed pages.
- accessibility:
* improved the accessibility of the archive module's calendar.
* improved form handling and error reporting.
- documentation:
* added PHPDoc/Doxygen comments.
Drupal 4.4.2, 2004-07-04
......@@ -80,10 +84,11 @@ Drupal 4.4.0, 2004-04-01
* grouped form elements using '<fieldset>' and '<legend>' tags.
* added '<label>' tags to form elements.
- refactored 404 (file not found) handling and added support for custom 404 pages.
- documentation:
* added PHPDoc/Doxygen comments.
- improved the filter system to prevent conflicts between filters:
* made it possible to change the order in which filters are applied.
- documentation:
* added PHPDoc/Doxygen comments.
Drupal 4.3.2, 2004-01-01
------------------------
......
......@@ -62,7 +62,8 @@
"2004-06-11" => "update_88",
"2004-06-18" => "update_89",
"2004-06-27" => "update_90",
"2004-06-30" => "update_91"
"2004-06-30" => "update_91",
"2004-07-07" => "update_92"
);
function update_32() {
......@@ -1142,6 +1143,10 @@ function update_91() {
return $ret;
}
function update_92() {
$ret[] = update_sql("DELETE FROM {cache}");
}
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);
......
......@@ -86,6 +86,14 @@ function page_set_cache() {
if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET') {
// This will fail in some cases, see page_get_cache() for the explanation.
if ($data = ob_get_contents()) {
if (function_exists('gzencode')) {
if (version_compare(phpversion(), '4.2', '>=')) {
$data = gzencode($data, 9, FORCE_GZIP);
}
else {
$data = gzencode($data, FORCE_GZIP);
}
}
cache_set(request_uri(), $data, 1, drupal_get_headers());
}
}
......@@ -145,6 +153,15 @@ function drupal_page_header() {
header("Last-Modified: $date");
header("ETag: $etag");
// Determine if the browser accepts gzipped data
if (@strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === false && function_exists('gzencode')) {
// strip the gzip header and run uncompress
$cache->data = gzinflate(substr(substr($cache->data, 10), 0, -8));
}
elseif (function_exists('gzencode')) {
header('Content-Encoding: gzip');
}
/*
** Send the original request's headers. We send them one after
** another so PHP's header() function can deal with duplicate
......
......@@ -26,7 +26,7 @@ function system_help($section) {
<pre> 00 * * * * /home/www/drupal/scripts/cron-lynx.sh</pre>
Note that it is essential to access <code>cron.php</code> using a browser on the web site's domain; do not run it using command line PHP and avoid using <code>localhost</code> or <code>127.0.0.1</code> or some of the environment variables will not be set correctly and features may not work as expected.</p>
<h3><a id=\"cache\">Cache</a></h3>
<p>Drupal has a caching mechanism which stores dynamically generated web pages in a database. By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load. Only pages requested by \"anonymous\" users are cached.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
<p>Drupal has a caching mechanism which stores dynamically generated web pages in a database. By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load. Only pages requested by \"anonymous\" users are cached. In order to reduce server load and save bandwidth, Drupal stores and sends cached pages compressed.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
case 'admin/modules#description':
return t('Configuration system that lets administrators modify the workings of the site.');
}
......
......@@ -26,7 +26,7 @@ function system_help($section) {
<pre> 00 * * * * /home/www/drupal/scripts/cron-lynx.sh</pre>
Note that it is essential to access <code>cron.php</code> using a browser on the web site's domain; do not run it using command line PHP and avoid using <code>localhost</code> or <code>127.0.0.1</code> or some of the environment variables will not be set correctly and features may not work as expected.</p>
<h3><a id=\"cache\">Cache</a></h3>
<p>Drupal has a caching mechanism which stores dynamically generated web pages in a database. By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load. Only pages requested by \"anonymous\" users are cached.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
<p>Drupal has a caching mechanism which stores dynamically generated web pages in a database. By caching a web page, Drupal does not have to create the page each time someone wants to view it, instead it takes only one SQL query to display it, reducing response time and the server's load. Only pages requested by \"anonymous\" users are cached. In order to reduce server load and save bandwidth, Drupal stores and sends cached pages compressed.</p>", array('%base_url' => $base_url, '%cron-link' => "<a href=\"$base_url/cron.php\">$base_url/cron.php</a>", '%lynx' => 'http://lynx.browser.org', '%wget' => 'http://www.gnu.org/software/wget/wget.html' ));
case 'admin/modules#description':
return t('Configuration system that lets administrators modify the workings of the site.');
}
......
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