From 77e0acc0d3401860baa8663d6fe555528b492d72 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 26 Nov 2002 18:03:18 +0000 Subject: use local_cookie for support local-cgi commands * file.c (loadGeneralFile): pass Local_cookie to DirBufferCommand * fm.h (Local_cookie): Str * local.c (setLocalCookie): Str, set_environ() (set_cgi_environ): remove LOCAL_COOKIE * main.c (ldhelp): pass Local_cookie (adBmark): ditto * rc.c (optionpanel_src1): cookie (load_option_panel): pass Local_cookie * w3mbookmark.c (main): check Local_cookie * w3mhelperpanel (main): ditto * scripts/dirlist.cgi.in: ditto * scripts/w3mhelp.cgi.in: ditto * scripts/multipart/multipart.cgi.in: ditto From: Hironori SAKAMOTO --- scripts/w3mhelp.cgi.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'scripts/w3mhelp.cgi.in') diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 2ced3fc..4351813 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -1,5 +1,5 @@ #!@PERL@ -# $Id: w3mhelp.cgi.in,v 1.16 2002/11/21 16:15:59 ukai Exp $ +# $Id: w3mhelp.cgi.in,v 1.17 2002/11/26 18:03:30 ukai Exp $ if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) { $CYGPATH = 1; @@ -49,6 +49,18 @@ if (defined($ENV{'QUERY_STRING'})) { $lang = $tlang; } } + if ($ENV{'QUERY_STRING'} =~ /(^|&)cookie=([^&]*)/) { + $cookie = $2; + $cookie =~ s/\+|%([0-9A-Fa-f][0-9A-Fa-f])/$& eq '+' ? ' ' : pack('C', hex($1))/ge; + } +} +if (($cookie eq "") || ($cookie ne $ENV{"LOCAL_COOKIE"})) { + print <