Ignore:
Timestamp:
2009-04-25T18:45:58+12:00 (15 years ago)
Author:
davidb
Message:

Revap of Greenstone as a module for Apache. Initial version coded by DL Consulting

File:
1 edited

Legend:

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

    r19109 r19259  
    14481448}
    14491449
     1450
    14501451void receptionist::define_general_macros (cgiargsclass &args, outconvertclass &/*outconvert*/,
    14511452                      ostream &logout) {
     
    14571458  disp.setmacro ("httpweb", displayclass::defaultpackage, configinfo.httpweb);
    14581459  disp.setmacro ("httpprefix", displayclass::defaultpackage, configinfo.httpprefix);
    1459 
    14601460
    14611461  text_t compressedoptions = get_compressed_arg(args, logout);
     
    15591559    }
    15601560  }
    1561 
     1561 
    15621562  if (!collection.empty()) {
    15631563    ColInfoResponse_t cinfo;
     
    15661566    if (collectproto != NULL) {
    15671567      collectproto->get_collectinfo (collection, cinfo, err, logout);
     1568
     1569
     1570      // This part of the code used to use "cinfo.httpprefix" regardless
     1571      // of the value it contained.  Since
     1572      // this can come back with an empty (in the case of gsdl_mod), the
     1573      // URL produced was invalid.
     1574      //
     1575      // Changed to test for empty first, and use configinfo.httpprefix as
     1576      // a "backup"
     1577      //
     1578      // Point to consider: since configinfo.httpprefix has been offically
     1579      // set as "httpprefix" in macros, it seems to make more sense to use
     1580      // always use that version and not the cinfo version at all.
     1581
     1582      text_t httpprefix
     1583    = (!cinfo.httpprefix.empty()) ? cinfo.httpprefix : configinfo.httpprefix;
     1584   
    15681585      text_t httpcollection;
    15691586      if (!cinfo.httpdomain.empty()) httpcollection = "http://";
    1570       httpcollection += cinfo.httpdomain + cinfo.httpprefix + "/collect/"
     1587      httpcollection += cinfo.httpdomain + httpprefix + "/collect/"
    15711588    + collection;
    15721589      disp.setmacro ("httpcollection", displayclass::defaultpackage,
    15731590             httpcollection);
     1591     
    15741592      // as of gsdl 2.53, collect.cfg can specify macros
    15751593      if (cinfo.collection_macros.size() > 0) {
Note: See TracChangeset for help on using the changeset viewer.