Changeset 2608


Ignore:
Timestamp:
2001-06-25T16:40:40+12:00 (23 years ago)
Author:
jrm21
Message:

Last-Modified http header now actually works (needed gsdlhome prepended
to collection directory). This is used to indicate to browsers whether they
should cache a page or not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/receptionist.cpp

    r2607 r2608  
    3838#include <time.h>
    3939#include <stdio.h>
    40 // following 2 are for printing Last-modified http header.
     40// following 2 are for printing Last-Modified http header.
    4141#include <sys/stat.h>
    4242#include <time.h>
     
    758758
    759759    // use the later of build.cfg and collect.cfg modification times
    760     // as the Last-modified: header, for caching values
     760    // as the Last-Modified: header, for caching values
    761761    struct stat file_info;
    762762    time_t latest=0;
     
    765765    collectname=args["c"];
    766766    if (collectname != "") {
    767       text_t collectdir=filename_cat("collect",collectname);
     767      text_t collectdir=filename_cat(configinfo.gsdlhome,"collect");
     768      collectdir=filename_cat(collectdir,collectname);
    768769      text_t buildcfg=filename_cat(collectdir,"index");
    769770      buildcfg=filename_cat(buildcfg,"build.cfg");
     
    791792    // print out modified time, "DDD, dd MMM YYYY hh:mm:ss" format
    792793    // c library takes care of mem for this string... (has \n at end!!!!)
    793     contentout << "Last-modified: " << ctime(&latest);
     794    contentout << "Last-Modified: " << ctime(&latest);
    794795      }
    795796    }
Note: See TracChangeset for help on using the changeset viewer.