aboutsummaryrefslogtreecommitdiff
path: root/www/webglimpse/files/patch-ak
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1998-11-02 20:04:30 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1998-11-02 20:04:30 +0000
commitc2c19a265f40f87354bfed3e8cacb42fd262c105 (patch)
treed483c2afed4f897da1978164f5322f884c2f8ba1 /www/webglimpse/files/patch-ak
parentc40cfa8f1dfb6dcb10f91a72ee6f6602de5ea0de (diff)
downloadports-c2c19a265f40f87354bfed3e8cacb42fd262c105.tar.gz
ports-c2c19a265f40f87354bfed3e8cacb42fd262c105.zip
Notes
Diffstat (limited to 'www/webglimpse/files/patch-ak')
-rw-r--r--www/webglimpse/files/patch-ak131
1 files changed, 131 insertions, 0 deletions
diff --git a/www/webglimpse/files/patch-ak b/www/webglimpse/files/patch-ak
new file mode 100644
index 000000000000..50f315de115a
--- /dev/null
+++ b/www/webglimpse/files/patch-ak
@@ -0,0 +1,131 @@
+--- cgi-bin/webglimpse.orig Mon Jul 27 22:59:49 1998
++++ cgi-bin/webglimpse Mon Nov 2 15:06:45 1998
+@@ -39,6 +39,9 @@
+ # **** **** **** **** CONFIGURABLE VARIABLES **** **** **** ****
+ # We need some of these to find our libraries, so wrap them in a BEGIN block
+
++use POSIX qw(locale_h);
++use locale;
++
+ BEGIN{
+
+ $WEBGLIMPSE_HOME = "/usr/local/webglimpse";
+@@ -117,14 +120,21 @@
+ # Added optional module to support result caching
+ $QS_cache = '';
+
++$charset = '';
++$put_header = 0;
++
+ # **** **** **** **** Done settings **** **** **** ****
+
+-BEGIN {
++sub http_header {
++
++return if ($put_header);
++$put_header = 1;
++
+ # make the output as we can
+ $| = 1;
+
+ # might as well start the message now
+-print "Content-type: text/html\n\n";
++print "Content-type: text/html$charset\n\n";
+
+ print "<!-- TESTING -->\n";
+
+@@ -216,10 +226,20 @@
+ $nhhops = 0;
+ $traverse_type = 0;
+ $urlpath = '';
++$vhost = '';
++$usemaxmem = '';
++$locale = '';
+ @urllist = ();
+
+ ($title, $urlpath, $traverse_type, $explicit_only, $numhops,
+- $nhhops, $local_limit, $remote_limit, $addboxes, @urllist) = ReadConfig($indexdir);
++ $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir);
++
++$ENV{LANG}=$locale if ($locale ne '');
++setlocale(LC_CTYPE, "");
++
++$charset = "; charset=$charset" if ($charset ne '');
++
++&http_header;
+
+ # Ensure that Glimpse is available on this machine
+ -x $GLIMPSE_LOC || &err_noglimpse($GLIMPSE_LOC) ;
+@@ -667,7 +687,7 @@
+ sub err_noneighborhood {
+
+ local($_) = @_;
+-
++ &http_header;
+ # neighborhood does not exist
+ print <<EOM;
+ <hr>
+@@ -683,6 +703,7 @@
+
+ ##########################################################################
+ sub err_noquery {
++ &http_header;
+ # The script was called without a query.
+ # Provide an ISINDEX type response for browsers
+ # without form support.
+@@ -732,6 +753,7 @@
+ ##########################################################################
+ sub err_noglimpse {
+ local($_) = @_;
++ &http_header;
+ #
+ # Glimpse was not found
+ # Report a useful message
+@@ -756,6 +778,7 @@
+ ##########################################################################
+ sub err_badglimpse {
+ my(@glines) = @_;
++ &http_header;
+ #
+ # Glimpse had an error
+ # Report a useful message
+@@ -786,6 +809,7 @@
+ ##########################################################################
+ sub err_noindex {
+ local ($indexdir) = @_;
++ &http_header;
+ # Glimpse index was not found
+ # Give recommendations for indexing
+ print "<TITLE>Glimpse Index not found</TITLE>\n";
+@@ -801,6 +825,7 @@
+ }
+ ##########################################################################
+ sub err_insecurepath {
++ &http_header;
+ # Path user requested contains ".." characters
+ print "<TITLE>Path not accepted</TITLE>\n";
+ print "</HEAD>\n";
+@@ -814,6 +839,7 @@
+
+ ##########################################################################
+ sub err_conf {
++ &http_header;
+ # Glimpse archive Configuration File was not found
+ print "<TITLE>Glimpse Archive Configuration File not found</TITLE>\n";
+ print "</HEAD>\n";
+@@ -827,6 +853,7 @@
+
+ ##########################################################################
+ sub err_badquery {
++ &http_header;
+ print "<TITLE>Query is too broad</TITLE>\n";
+ print "</HEAD>\n";
+ print "<BODY>\n";
+@@ -840,6 +867,7 @@
+
+ ##########################################################################
+ sub err_locked {
++ &http_header;
+ print "<TITLE>Indexing in progress</TITLE>\n";
+ print "</HEAD>\n";
+ print "<BODY>\n";