Why is the expire header set to some time in the past ('Sun, 11 Mar 1984 12:00:00 GMT') in Drupal 6/ PressFlow and Drupal 7? I have been trying to understand why the expires header is set to the past. I read the comment  In boostrap.inc drupal 6  but I am still a bit confused about it and the relation between expires and vary headers. I looked into this because I am trying to set the expire header in the hope of controlling varnish object cache expiration regardless of TTL. The code reads:

  // HTTP/1.0 proxies do not support the Vary header, so prevent any caching
  // by sending an Expires date in the past. HTTP/1.1 clients ignores the
  // Expires header if a Cache-Control: max-age= directive is specified (see RFC
  // 2616, section 14.9.3).
  $default_headers['Expires'] = 'Sun, 11 Mar 1984 12:00:00 GMT';


Would it affect me if I set the caching headers like expire? I want to do this only for anonymous users.  

I posted a varnish question related to this here:
https://stackoverflow.com/questions/19121220/how-to-control-how-long-varnish-expire-a-page-from-the-backend
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3.


  If a response includes both an Expires header and a max-age directive,
  the max-age  directive overrides the Expires header, even if the
  Expires header is more restrictive.  This rule allows an origin server
  to provide, for a given response, a longer expiration  time to an
  HTTP/1.1 (or later) cache than to an HTTP/1.0 cache.


And if you look at the following code, you can see that the reason they do that is to prevent caching and allow you to do your own caching. This disables the internal page cache but returns headers allowing downstream caches (such as Squid, Varnish, and other reverse proxies) to cache full pages.

function drupal_page_cache_header_external() {
  // Get headers set in hook_boot(). Keys are lower-case.
  $hook_boot_headers = drupal_get_header();

  $max_age = variable_get('page_cache_max_age', 0);
  drupal_set_header('Cache-Control', 'public, max-age=' . $max_age);
  drupal_set_header('Last-Modified', gmdate(DATE_RFC1123, $_SERVER['REQUEST_TIME']));

  // HTTP/1.0 proxies do not support the Vary header, so prevent any caching
  // by sending an Expires date in the past. HTTP/1.1 clients ignores the
  // Expires header if a Cache-Control: max-age= directive is specified (see RFC
  // 2616, section 14.9.3).
  drupal_set_header('Expires', 'Sun, 11 Mar 1984 12:00:00 GMT');

  // Allow HTTP proxies to cache pages for anonymous users without a session
  // cookie. The Vary header is used to indicates the set of request-header
  // fields that fully determines whether a cache is permitted to use the
  // response to reply to a subsequent request for a given URL without
  // revalidation. If a Vary header has been set in hook_boot(), it is assumed
  // that the module knows how to cache the page.
  if (!isset($hook_boot_headers['vary']) &amp;&amp; !variable_get('omit_vary_cookie', FALSE)) {
    drupal_set_header('Vary', 'Cookie');
  }
}