Change Request for HT Dig


Soffen, Matthew (msoffen@iso-ne.com)
Wed, 29 Jul 1998 16:24:01 -0400


I did this change to allow HtDig to be used as an SSI (Server Side
include). This allowed me to use it on my company's
web site. I know that it is able to read in HTML files but it is only
good if you have 1 level of includes. I do work on a site where there
is like 4 level's of includes including exec cgi/cmd's.

(Take a look: http://www.iso-ne.com/main.html)

Here is the diff file:

*** Display.cc Fri Mar 6 07:51:46 1998
--- Display.cc.orig Fri Mar 6 07:52:59 1998
***************
*** 249,258 ****
          i = nMatches;
      vars.Add("LASTDISPLAYED", new String(form("%d", i)));
          
! if (getenv("DOCUMENT_URI"))
! vars.Add("CGI", new String(getenv("DOCUMENT_URI")));
! else
! vars.Add("CGI", new String(getenv("SCRIPT_NAME")));
          
      String *str;
      char *format = input->get("format");
--- 249,255 ----
          i = nMatches;
      vars.Add("LASTDISPLAYED", new String(form("%d", i)));
          
! vars.Add("CGI", new String(getenv("SCRIPT_NAME")));
          
      String *str;
      char *format = input->get("format");
***************
*** 353,363 ****
  {
      String s;
  
! if (getenv("DOCUMENT_URI"))
! url << getenv("DOCUMENT_URI") << '?';
! else
! url << getenv("SCRIPT_NAME") << '?';
!
      if (input->exists("restrict"))
          s << "restrict=" << input->get("restrict") << '&';
      if (input->exists("exclude"))
--- 350,356 ----
  {
      String s;
  
! url << getenv("SCRIPT_NAME") << '?';
      if (input->exists("restrict"))
          s << "restrict=" << input->get("restrict") << '&';
      if (input->exists("exclude"))

Matthew Soffen - Webmaster http://www.iso-ne.com/

ISO New England
1 Sullivan Road
Holyoke, MA 01040-2841
(413) 535 8167
==============================================
Boss - "My boss says we need some eunuch programmers."
Dilbert - "I think he means UNIX and I already know UNIX."
Boss - "Well, if the company nurse comes by, tell her I said
             never mind."
                                       - Dilbert -
==============================================



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:26:56 PST