Branch: Tag:

2005-12-13

2005-12-13 12:17:44 by Anders Johansson <anders@roxen.com>

Don't use return code from ram cache when returning 304 not modified.

Rev: server/protocols/http.pike:1.491

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2004, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.490 2005/12/07 15:13:05 grubba Exp $"; + constant cvs_version = "$Id: http.pike,v 1.491 2005/12/13 12:17:44 anders Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
2536: Inside #if defined(RAM_CACHE)
   {    int code = file->error;    int len = sizeof(d); +  // Make sure we don't mess with the RAM cache. +  file += ([]);    if (since && file->last_modified) {    array(int) since_info = Roxen.parse_since( since );    if ((since_info[0] >= file->last_modified) &&
2547: Inside #if defined(RAM_CACHE)
   len = 0;    }    } +  file->error = code;    if (method == "HEAD") {    d = "";    }
2583: Inside #if defined(RAM_CACHE)
   }    }    if (!skip) { -  // Make sure we don't mess with the RAM cache. -  file += ([]); -  file->error = code; +     file->data = d;    file->len = len;