From 71ad5b6272d0bc6320bea6c1ec10f5e10bbfe8ef Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 8 Jan 1996 08:42:12 +0000 Subject: [PATCH] Handles method GET. --- www/egwindex.html | 10 +++++++--- www/mquery.egw | 4 ++-- www/msearch.egw | 4 ++-- www/mtargets.egw | 4 ++-- www/query.egw | 4 ++-- www/search.egw | 7 ++++--- www/wcgi.c | 27 ++++++++++++++++++++++++--- 7 files changed, 43 insertions(+), 17 deletions(-) diff --git a/www/egwindex.html b/www/egwindex.html index f6c7dfd..5a8b9db 100644 --- a/www/egwindex.html +++ b/www/egwindex.html @@ -3,13 +3,17 @@ Europagate WWW index -

Europagate WWW index, $Id: egwindex.html,v 1.6 1995/11/08 12:42:16 adam Exp $

+

Europagate WWW index, $Id: egwindex.html,v 1.7 1996/01/08 08:42:12 adam Exp $

z39 targets: targets.egw -(experimental)
+(with + debug) +
Multiple z39 targets: - mtargets.egw (very experimental) + mtargets.egw +(with +debug)
diff --git a/www/mquery.egw b/www/mquery.egw index 548026a..9e76a03 100644 --- a/www/mquery.egw +++ b/www/mquery.egw @@ -4,7 +4,7 @@ { -# $Id: mquery.egw,v 1.7 1996/01/03 15:19:37 adam Exp $ +# $Id: mquery.egw,v 1.8 1996/01/08 08:42:13 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -21,7 +21,7 @@ } html {

} \n + html / $sessionId {/msearch.egw/} $setNo {" method=get>} \n set phost {} set i 0 diff --git a/www/msearch.egw b/www/msearch.egw index 5407ca3..01fa9ab 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,6 +1,6 @@ { -# $Id: msearch.egw,v 1.9 1996/01/04 10:40:00 adam Exp $ +# $Id: msearch.egw,v 1.10 1996/01/08 08:42:13 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -50,7 +50,7 @@ html "Error\n
NSD$code: $msg: $addinfo" } else { set r [z39$i.$setNo resultCount] - html "$r hits\n
    \n" + html "$r hits\n
    \n
      \n" display-rec 1 $hist($setNo,$i,offset) display-brief $i html "
    " diff --git a/www/mtargets.egw b/www/mtargets.egw index 5d0bacd..9254cad 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,6 +1,6 @@ { -# $Id: mtargets.egw,v 1.8 1996/01/03 15:19:38 adam Exp $ +# $Id: mtargets.egw,v 1.9 1996/01/08 08:42:14 adam Exp $ set setNo 1 source /usr/local/etc/httpd/conf/ztargets.conf if {[info commands saveState] == ""} { @@ -34,7 +34,7 @@

    Choose one or more Z39.50 targets

    { html {
    } \n + html / $sessionId {/mquery.egw/} $setNo {" method=get>
    } \n html "
    \n" foreach t [array names targets] { html {
    } [ lindex $targets($t) 0] diff --git a/www/query.egw b/www/query.egw index 92e2e1d..a5b874e 100644 --- a/www/query.egw +++ b/www/query.egw @@ -4,7 +4,7 @@ { -# $Id: query.egw,v 1.25 1996/01/04 10:40:00 adam Exp $ +# $Id: query.egw,v 1.26 1996/01/08 08:42:15 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -113,7 +113,7 @@ proc ok-response {} { } html {} \n + html / $sessionId {/search.egw/} $setNo {" method=get>} \n set nodb [llength $databases] if {$nodb > 1} { if {$nodb > 2} { diff --git a/www/search.egw b/www/search.egw index 0920e0a..587e94d 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.24 1996/01/05 16:35:01 adam Exp $ +# $Id: search.egw,v 1.25 1996/01/08 08:42:17 adam Exp $ proc start-scan {scanNo cache dir} { global sessionId @@ -212,6 +212,7 @@ proc buttons {setNo setMax startPos after} { } set hist($setNo,query) $query } else { + if {![info exists hist($setNo,scan)]} return if {$hist($setNo,scan) > 0} { set scanNo [lindex $sessionParms 1] set dir [lindex $sessionParms 2] @@ -286,8 +287,8 @@ proc buttons {setNo setMax startPos after} { html "

    Debug information

    \n" html "sessionId: $sessionId
    \n" html "sessionParms: $sessionParms
    \n" - foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} { - html $e {: } $env($e) {
    } \n + foreach n [array names env] { + html "env($n) = " $env($n) "
    \n" } html "form: " [wform] "
    \n" html "target: " $host "
    \n" diff --git a/www/wcgi.c b/www/wcgi.c index a94c5ff..722d109 100644 --- a/www/wcgi.c +++ b/www/wcgi.c @@ -41,7 +41,10 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wcgi.c,v $ - * Revision 1.10 1996/01/05 16:21:20 adam + * Revision 1.11 1996/01/08 08:42:19 adam + * Handles method GET. + * + * Revision 1.10 1996/01/05 16:21:20 adam * Bug fix: shell (wproto) sometimes closed server FIFO before cgi * program opened it - solution: cgi sends OK when response has been read. * @@ -142,6 +145,17 @@ static int spawn (char *sprog, int id) } } +#if 0 +static void print_environ (void) +{ + extern char **environ; + int i; + + for (i = 0; environ[i]; i++) + gw_log (GW_LOG_DEBUG, prog, "e: %s", environ[i]); +} +#endif + /* * NOTE: In the (perhaps odd) terminology used within this software, * the 'server' is the present program, which is executed by the httpd @@ -271,6 +285,7 @@ int main() strcpy(p, serverp); p += strlen(p) + 1; strcpy(p, path_info); + gw_log (GW_LOG_DEBUG, prog, "P:%s", p); p += strlen(p) + 1; *(p++) = '\0'; /* no envvars tranferred at present */ if ((t = getenv("CONTENT_LENGTH")) && (data = atoi(t)) > 0) @@ -293,8 +308,14 @@ int main() i += j; } } - p += data; - *(p++) = '\0'; + else if ((t = getenv("QUERY_STRING"))) + { + strcpy (p, t); + data = strlen(p); + } + p[data] = '\0'; + gw_log (GW_LOG_DEBUG, prog, "C:%s", p); + p += data+1; data = (p - combuf); memcpy(combuf, &data, sizeof(data)); gw_log (GW_LOG_DEBUG, prog, "Writing data"); -- 1.7.10.4