Make WordPress Core

Changeset 1037


Ignore:
Timestamp:
03/31/2004 04:14:20 AM (21 years ago)
Author:
michelvaldrighi
Message:

your aggregator will love you, part 2: fixing support for 304 :P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1036 r1037  
    101101
    102102      if (!empty($request_headers['If-Modified-Since'])) {
    103         if (strtotime($request_headers['If-Modified-Since']) <= strtotime($last_modified_date)) {
     103        if (strtotime($request_headers['If-Modified-Since']) >= strtotime($last_modified_date)) {
    104104          $_match_ifmodifiedsince = 1;
    105105        } else {
     
    108108      }
    109109      if (!empty($request_headers['If-None-Match'])) {
    110         if ($request_headers['If-None-Match'] == md5($last_modified_date)) {
     110        if ($request_headers['If-None-Match'] == '"'.md5($last_modified_date).'"') {
    111111          $_match_ifnonematch = 1;
    112112        } else {
     
    116116
    117117      // if one element is present but doesn't match the header, the -1 makes this <=0
    118       if ($_match_ifmodifiedsince + $_match_ifnonematch) {
     118      if ($_match_ifmodifiedsince + $_match_ifnonematch > 0) {
    119119        header("HTTP/1.1 304 Not Modified\n\n");
    120120      }
Note: See TracChangeset for help on using the changeset viewer.