--- cgic.c.orig Mon Jan 11 17:37:14 1999 +++ cgic.c Thu Jun 17 12:58:02 1999 @@ -43,6 +43,7 @@ char *cgiAccept; char *cgiUserAgent; char *cgiReferrer; +char *cgiDocumentRoot; FILE *cgiIn; FILE *cgiOut; @@ -101,6 +102,7 @@ cgiGetenv(&cgiAccept, "HTTP_ACCEPT"); cgiGetenv(&cgiUserAgent, "HTTP_USER_AGENT"); cgiGetenv(&cgiReferrer, "HTTP_REFERER"); + cgiGetenv(&cgiDocumentRoot, "DOCUMENT_ROOT"); #ifdef CGICDEBUG CGICDEBUGSTART fprintf(dout, "%d\n", cgiContentLength); @@ -386,6 +388,7 @@ free(cgiAccept); free(cgiUserAgent); free(cgiReferrer); + free(cgiDocumentRoot); } } @@ -842,6 +845,9 @@ if (!cgiWriteString(out, cgiReferrer)) { goto error; } + if (!cgiWriteString(out, cgiDocumentRoot)) { + goto error; + } if (!cgiWriteInt(out, cgiContentLength)) { goto error; } @@ -952,6 +958,9 @@ goto error; } if (!cgiReadString(in, &cgiReferrer)) { + goto error; + } + if (!cgiReadString(in, &cgiDocumentRoot)) { goto error; } if (!cgiReadInt(in, &cgiContentLength)) { --- cgic.h.orig Mon Jan 11 17:24:03 1999 +++ cgic.h Thu Jun 17 12:58:42 1999 @@ -37,6 +37,7 @@ extern char *cgiContentType; extern char *cgiAccept; extern char *cgiUserAgent; +extern char *cgiDocumentRoot; extern char *cgiReferrer; /* A macro providing the same incorrect spelling that is found in the HTTP/CGI specifications */