diff -c plexus/VERSION:2.19 plexus/VERSION:2.20 *** plexus/VERSION:2.19 Wed Dec 7 17:51:16 1994 --- plexus/VERSION Wed Dec 7 17:51:16 1994 *************** *** 1 **** ! Plexus Version 3.0n --- 1 ---- ! Plexus Version 3.0o diff -c plexus/access/access-filter.pl:1.7 plexus/access/access-filter.pl:1.8 *** plexus/access/access-filter.pl:1.7 Wed Dec 7 17:51:17 1994 --- plexus/access/access-filter.pl Wed Dec 7 17:51:17 1994 *************** *** 109,131 **** $pat = '*/' . $pat unless $pat =~ m#^[\/\*]#; $pat =~ s#^/##; local($host, $methods, $users, $groups) = ('*', '*', '*', ''); ! if ($spec[0] eq 'domain') { ! shift @spec; $host = shift @spec; ! $host =~ y/A-Z/a-z/; # lower case ! $host =~ s/\.+$//; # remove trailing .'s ! $host .= 'd'; ! } elsif ($spec[0] eq 'ip') { ! shift @spec; $host = shift @spec; ! local($addr,$mask) = (split('/',$host)); ! $addr = pack("C4", (split('\.',$addr))); ! $mask = pack("C4", (split('\.',$mask||'255.255.255.255'))); ! $host = $addr . $mask . 'a'; ! } elsif ($spec[0] eq 'methods') { ! shift @spec; $methods = shift @spec; ! } elsif ($spec[0] eq 'users') { ! shift @spec; $users = shift @spec; ! } elsif ($spec[0] eq 'groups') { ! shift @spec; $groups = shift @spec; } push(@lines, join('', &main'globpat($pat), "\377", --- 109,133 ---- $pat = '*/' . $pat unless $pat =~ m#^[\/\*]#; $pat =~ s#^/##; local($host, $methods, $users, $groups) = ('*', '*', '*', ''); ! while ($spec[0]) { ! if ($spec[0] eq 'domain') { ! shift @spec; $host = shift @spec; ! $host =~ y/A-Z/a-z/; # lower case ! $host =~ s/\.+$//; # remove trailing .'s ! $host .= 'd'; ! } elsif ($spec[0] eq 'ip') { ! shift @spec; $host = shift @spec; ! local($addr,$mask) = (split('/',$host)); ! $addr = pack("C4", (split('\.',$addr))); ! $mask = pack("C4", (split('\.',$mask||'255.255.255.255'))); ! $host = $addr . $mask . 'a'; ! } elsif ($spec[0] eq 'methods') { ! shift @spec; $methods = shift @spec; ! } elsif ($spec[0] eq 'users') { ! shift @spec; $users = shift @spec; ! } elsif ($spec[0] eq 'groups') { ! shift @spec; $groups = shift @spec; ! } } push(@lines, join('', &main'globpat($pat), "\377", diff -c plexus/doc/Upgrade.html:2.2 plexus/doc/Upgrade.html:2.3 *** plexus/doc/Upgrade.html:2.2 Wed Dec 7 17:51:21 1994 --- plexus/doc/Upgrade.html Wed Dec 7 17:51:21 1994 *************** *** 18,31 **** The main thing you need to worry about is that incoming path names are no longer filtered for special characters. There is a new routine called ! &main'safeopen that can be used to open files with names derived from user data. The rest shouldn't affect code in the gateway itself (unless you want to use the new query facilities to preprocess the query data).

diff -c plexus/doc/search.html:2.6 plexus/doc/search.html:2.7 *** plexus/doc/search.html:2.6 Wed Dec 7 17:51:21 1994 --- plexus/doc/search.html Wed Dec 7 17:51:21 1994 *************** *** 11,17 **** HREF="/server/search.pl">search.pl when ever you have a small amount of data that you would like to allow full regular expression searches on. Just add a map for the base directory in ! the config file that points to &do_search like the example in the distributed local.conf config file.

For example: --- 11,17 ---- HREF="/server/search.pl">search.pl when ever you have a small amount of data that you would like to allow full regular expression searches on. Just add a map for the base directory in ! the config file that points to &do_search like the example in the distributed local.conf config file.

For example: diff -c plexus/doc/web-info.html:2.13 plexus/doc/web-info.html:2.14 *** plexus/doc/web-info.html:2.13 Wed Dec 7 17:51:22 1994 --- plexus/doc/web-info.html Wed Dec 7 17:51:22 1994 *************** *** 35,41 ****

  • Mosaic for X "Level 2" Fill-Out Form Support
  • Relationships in HTML links
  • Universal Resource Identifiers: Contents !
  • HaLsoft HTML Validation Service
    If your HTML is on a WWW server you can pass the URL via the form below. If not, use the form at HaL.
    --- 35,41 ----
  • Mosaic for X "Level 2" Fill-Out Form Support
  • Relationships in HTML links
  • Universal Resource Identifiers: Contents !
  • HaLsoft HTML Validation Service
    If your HTML is on a WWW server you can pass the URL via the form below. If not, use the form at HaL. *************** *** 87,94 ****
  • People involved in the WorldWideWeb project
  • Notes from WWWWW
  • Proposed Client Profile Spec !
  • HTML 2.0 Specification Review Materials !
  • HTML 2.0 DTD Reference
  • HTML+ DTD (under development) --- 87,94 ----
  • People involved in the WorldWideWeb project
  • Notes from WWWWW
  • Proposed Client Profile Spec !
  • HTML 2.0 Specification Review Materials !
  • HTML 2.0 DTD Reference
  • HTML+ DTD (under development) diff -c plexus/src/local.conf:2.15 plexus/src/local.conf:2.16 *** plexus/src/local.conf:2.15 Wed Dec 7 17:51:24 1994 --- plexus/src/local.conf Wed Dec 7 17:51:24 1994 *************** *** 1,6 **** # Plexus config file # ! # local.conf,v 2.15 1994/11/08 21:51:56 sanders Exp # # Tony Sanders , April 1993 # --- 1,6 ---- # Plexus config file # ! # local.conf,v 2.16 1994/12/07 23:44:45 sanders Exp # # Tony Sanders , April 1993 # *************** *** 51,57 **** set locking flock # flock or fcntl set relative disabled # enabled allows .. in path set connection_max 25 # 0 disables limit ! set timeout 30 # access timeout limit (secs) set pidfile plexus.pid # pid output file set mailer /usr/bin/mail # called: ``$mailer -s subject to'' --- 51,57 ---- set locking flock # flock or fcntl set relative disabled # enabled allows .. in path set connection_max 25 # 0 disables limit ! set timeout 90 # access timeout limit (secs) set pidfile plexus.pid # pid output file set mailer /usr/bin/mail # called: ``$mailer -s subject to'' diff -c plexus/src/log-simple.pl:2.7 plexus/src/log-simple.pl:2.8 *** plexus/src/log-simple.pl:2.7 Wed Dec 7 17:51:24 1994 --- plexus/src/log-simple.pl Wed Dec 7 17:51:24 1994 *************** *** 1,7 **** # # log-simple.pl -- Simple logging functions # ! # log-simple.pl,v 2.7 1994/11/06 21:02:52 sanders Exp # # by Tony Sanders , Sept 1993 --- 1,7 ---- # # log-simple.pl -- Simple logging functions # ! # log-simple.pl,v 2.8 1994/12/07 23:44:47 sanders Exp # # by Tony Sanders , Sept 1993 *************** *** 23,29 **** # Lock before writting to the log file because multiple # accesses might be going on at the same time. &main'seize(LOG, &main'LOCK_EX); ! seek(LOG, 2, 0); # seek to end print LOG $msg; &main'seize(LOG, &main'LOCK_UN); &main'clear_timeout; --- 23,29 ---- # Lock before writting to the log file because multiple # accesses might be going on at the same time. &main'seize(LOG, &main'LOCK_EX); ! seek(LOG, 0, 2); # seek to end print LOG $msg; &main'seize(LOG, &main'LOCK_UN); &main'clear_timeout; diff -c plexus/src/mime.pl:2.11 plexus/src/mime.pl:2.12 *** plexus/src/mime.pl:2.11 Wed Dec 7 17:51:25 1994 --- plexus/src/mime.pl Wed Dec 7 17:51:25 1994 *************** *** 1,6 **** # mime.pl -- handle MIME headers # ! # mime.pl,v 2.11 1994/11/06 21:03:44 sanders Exp # # by Tony Sanders , April 1993 # --- 1,6 ---- # mime.pl -- handle MIME headers # ! # mime.pl,v 2.12 1994/12/07 23:44:48 sanders Exp # # by Tony Sanders , April 1993 # *************** *** 83,88 **** --- 83,89 ---- sub resolve_header { local(*headers, $i) = @_; local(@list); + return undef unless defined $headers{$i}; @list = grep($_ .= "\n", split("\377", $headers{$i})); $i =~ s/\b([a-z])/\u$1/; join("$i: ", "",@list); diff -c plexus/src/plexus.conf:2.30 plexus/src/plexus.conf:2.31 *** plexus/src/plexus.conf:2.30 Wed Dec 7 17:51:25 1994 --- plexus/src/plexus.conf Wed Dec 7 17:51:25 1994 *************** *** 1,6 **** # Plexus config file # ! # plexus.conf,v 2.30 1994/11/06 21:04:47 sanders Exp # # Tony Sanders , April 1993 # --- 1,6 ---- # Plexus config file # ! # plexus.conf,v 2.31 1994/12/07 23:50:41 sanders Exp # # Tony Sanders , April 1993 # *************** *** 25,31 **** # # Basic configuration options # ! $server_version = 'plexus/3.0n'; # server version $http_service = 'http'; # the service in /etc/services $http_proto = 'tcp'; # type of protocol $http_defaultproto = 6; # fallback protocol number --- 25,31 ---- # # Basic configuration options # ! $server_version = 'plexus/3.0o'; # server version $http_service = 'http'; # the service in /etc/services $http_proto = 'tcp'; # type of protocol $http_defaultproto = 6; # fallback protocol number diff -c /dev/null plexus/unsupported/multi-format:1.1 *** /dev/null Wed Dec 7 17:51:29 1994 --- plexus/unsupported/multi-format Wed Dec 7 17:51:29 1994 *************** *** 0 **** --- 1,467 ---- + Replied: Wed, 16 Nov 1994 01:52:55 -0600 ts + Date: Wed, 16 Nov 1994 08:34:43 +0100 + From: ts + To: sanders@earth.com + Subject: multi selection in Plexus + + + + I've tried to implement multi selection in Plexus. + + Because I've looked at libwww2.17, it's C style and *not* Perl style :-( + + Actually, I've some problems with the implementation of multi-selection in + libwww2.17 and CERN httpd3.0, I've mailed my patches to "httpd@info.cern.ch" + and wait for confirmation, fatally this version has probably many bugs. + + It's better to put it in "unsupported". + + Characteristics : + + * this sub must be called when the last suffix is "multi". Example + + GET /test/welcome.multi + + * add line "addtype" in "local.conf", and "sub p_addtype" in plexus. + + # + # addtype MIME type suffix value + # + + * add line "language" in "local.conf", and "sub p_language" in plexus. + + # + # language language suffix + # + + * REQUIRE these two lines in "local.conf", actually not defined + + # + encoding 8bit html + encoding 7bit txt + # + + Example : + + moulon% ls /moulon/Public/www/test + welcome.fr.html welcome.fr.html3.Z welcome.html3 + welcome.fr.html.Z welcome.html + welcome.fr.html3 welcome.html.Z + moulon% test_multi.pl + ---------------------------------------------- + Accept : text/html; q=1.0,text/plain + Accept-Language : it; q=0.4,de + Accept-Encoding : x-gzip + .............................................. + welcome.fr.html 0.000000 text/html 8bit fr + welcome.fr.html.Z 0.000000 text/html x-compress fr + welcome.fr.html3 0.000000 text/x-html3 8bit fr + welcome.fr.html3.Z 0.000000 text/x-html3 x-compress fr + welcome.html 0.009900 text/html 8bit + welcome.html.Z 0.000000 text/html x-compress + welcome.html3 0.000000 text/x-html3 8bit + ---------------------------------------------- + Selection : /moulon/Public/www/test/welcome.html + Header line : Content-Type: text/html + Content-Encoding: 8bit + ---------------------------------------------- + Accept : text/x-html3 + Accept-Language : fr; q=0.6, it; q=0.4,de + Accept-Encoding : x-compress + .............................................. + welcome.fr.html 0.059400 text/html 8bit fr + welcome.fr.html.Z 0.594000 text/html x-compress fr + welcome.fr.html3 0.060000 text/x-html3 8bit fr + welcome.fr.html3.Z 0.600000 text/x-html3 x-compress fr + welcome.html 0.009900 text/html 8bit + welcome.html.Z 0.099000 text/html x-compress + welcome.html3 0.010000 text/x-html3 8bit + ---------------------------------------------- + Selection : /moulon/Public/www/test/welcome.fr.html3.Z + Header line : Content-Type: text/x-html3 + Content-Language: fr + Content-Encoding: x-compress + moulon% + + + Bugs : + + 1) *NOT TESTED* + + 2) Accept: it try the exact match then only subtypes. + Example, if the MIME type is "image/gif" it try "Accept: image/gif" + then "Accept: image/*" (if it has received this line), it don't check + "Accept: image/jpeg" ... , "Accept: */*" or "Accept: *" + + 3) Accept-Language: it try the exact match ("Accept-Language: xx_yy") then + the `general' language ("Accept-Language: xx"). If it has a file with + language type "en_US", it try "Accept-Language: en_US" then + "Accept-Language: en", it don't know that "en" eq "" (default value) + + 4) Accept-Encoding: it try only the exact match. + + 5) many others ... + + + Guy Decoux + + + #! /bin/sh + # This is a shell archive, meaning: + # 1. Remove everything above the #! /bin/sh line. + # 2. Save the resulting text in a file. + # 3. Execute the file with /bin/sh (not csh) to create the files: + # temp + # This archive created: Wed Nov 16 08:27:58 1994 + export PATH; PATH=/bin:$PATH + if test ! -d 'temp' + then + mkdir 'temp' + fi + cd 'temp' + if test -f 'test_multi.pl' + then + echo shar: will not over-write existing file "'test_multi.pl'" + else + sed 's/^X//' << \SHAR_EOF > 'test_multi.pl' + X#!/usr/local/bin/perl + X# ---------------------------- ONLY FOR TEST ----------------------- + Xsub p_addtype { local(@_) = split(" ", $_); local($c, $_) = shift(@_); + Xwhile (@_) { $d = shift(@_); $addtype{$d} = $c; $valtype{$c} = shift(@_);} } + Xsub p_encoding { local(@_) = split(" ", $_); local($c, $_) = shift(@_); foreach (@_) { $encoding{$_} = $c; } } + Xsub p_language { local(@_) = split(" ", $_); local($c, $_) = shift(@_); foreach (@_) { $language{$_} = $c; } } + X + Xsub process_config { + X local($FH, $cfg) = @_; + X local($cmd, $_); + X + X open($FH, $cfg) || die "$cfg: $!"; + X while (<$FH>) { + X chop; s/#.*//; s/^\s*//; s/\s*$//; next if /^$/; # cleanup + X ($cmd, $_) = split(" ", $_, 2); + X if (eval "defined &p_$cmd") { + X eval "&p_$cmd"; + X die $@ if $@; + X } else { + X warn "process_config ignored: $cmd $_\n"; + X } + X } + X close($FH); + X} + Xrequire 'multi.pl'; + X# ------------------------------------------------------------------- + X&process_config(CFG,"local_conf"); + X# + X$in_headers{'Accept'} = join("\377","text/html; q=1.0","text/plain"); + X$in_headers{'Accept-Language'} = join("\377","it; q=0.4","de"); + X$in_headers{'Accept-Encoding'} = join("\377","x-gzip"); + X# + X($file,@headers) = &process_multi("/moulon/Public/www/test/welcome.multi"); + Xprint "Selection : $file\n"; + Xprint "Header line : ",join("\n",@headers),"\n"; + X# + X$in_headers{'Accept'} = join("\377","text/x-html3"); + X$in_headers{'Accept-Language'} = join("\377","fr; q=0.6, it; q=0.4","de"); + X$in_headers{'Accept-Encoding'} = join("\377","x-compress"); + X# + X($file,@headers) = &process_multi("/moulon/Public/www/test/welcome.multi"); + Xprint "Selection : $file\n"; + Xprint "Header line : ",join("\n",@headers),"\n"; + X# ------------------------------------------------------------------- + X1; + SHAR_EOF + chmod +x 'test_multi.pl' + fi # end of overwriting check + if test -f 'multi.pl' + then + echo shar: will not over-write existing file "'multi.pl'" + else + sed 's/^X//' << \SHAR_EOF > 'multi.pl' + X + X$DEBUG = 1; + X + Xsub process_multi { + X local($path) = @_; + X local($dir,$file,$fichier,$fiche); + X local($tv,$ev,$lv,$va,$max,$ext,@exts); + X local($content_type,$content_encoding,$content_language,@temp_header); + X local(%accepted_types,%accepted_languages,%accepted_encodings); + X + X print "----------------------------------------------\n" if $DEBUG; + X# + X# scan Accept lines, add if necessary "text/html" and "text/plain" + X# + X print "Accept : ",join(",",split("\377",$main'in_headers{'Accept'})),"\n" if DEBUG; + X &scan_header($main'in_headers{'Accept'},*accepted_types); + X $accepted_types{'text/html'} = 1 if !defined $accepted_types{'text/html'}; + X $accepted_types{'text/plain'} = 0.9 if !defined $accepted_types{'text/plain'}; + X# + X# scan Accept-Language and Accept-Encoding + X# + X print "Accept-Language : ",join(",",split("\377",$main'in_headers{'Accept-Language'})),"\n" if DEBUG; + X &scan_header($main'in_headers{'Accept-Language'},*accepted_languages); + X print "Accept-Encoding : ",join(",",split("\377",$main'in_headers{'Accept-Encoding'})),"\n" if DEBUG; + X &scan_header($main'in_headers{'Accept-Encoding'},*accepted_encodings); + X# + X# retrieve all files in this directory + X# + X ($dir,$file) = $path =~ m#(.*)/(.*)\.multi$#; + X $max = -1; + X opendir(DH,$dir); + X @dirs = sort(readdir(DH)); + X print "..............................................\n" if $DEBUG; + X while ($_ = shift @dirs) { + X next if /^\.$/ || /^\.\.$/; + X next if defined($hidden{"$dir/$_"}) || defined($hidden{$_}); # hidden + X next unless /^$file/; + X $fichier = $_; + X s/^$file\.//; + X @exts = split(/\./); + X# + X# define content_type, content_encoding and content_language for this file + X# + X# WARNING : extract content_type from "addtype" and *NOT* from "content" + X# + X undef $content_type; undef $content_encoding; undef $content_language; + X foreach $ext (@exts) { + X if(defined $addtype{$ext}) { + X $content_type = $addtype{$ext}; + X $valtype = $valtype{$content_type}; + X } + X $content_encoding = $encoding{$ext} if defined $encoding{$ext}; + X $content_language = $language{$ext} if defined $language{$ext}; + X } + X# + X# compute the value + X# + X $tv = &value_type($content_type,$valtype,%accepted_types); + X $lv = &value_language($content_language,%accepted_languages); + X $ev = &value_encoding($content_encoding,%accepted_encodings); + X# + X# store the max of tv * ev * lv + X# + X if($tv > 0 && $ev > 0 && $lv > 0) { + X $va = $tv * $ev * $lv; + X if($va > $max) { + X $max = $va; + X $fiche = $fichier; + X @temp_header = (); + X push(@temp_header,"Content-Type: $content_type") if defined $content_type; + X push(@temp_header,"Content-Language: $content_language") if defined $content_language; + X push(@temp_header,"Content-Encoding: $content_encoding") if defined $content_encoding; + X } + X printf("%-20.20s %9.6f %-20.20s %-10.10s %-10.10s\n",$fichier, + X $va,$content_type,$content_encoding,$content_language) if $DEBUG + X } else { + X printf("%-20.20s %9.6f %-20.20s %-10.10s %-10.10s\n",$fichier, + X 0,$content_type,$content_encoding,$content_language) if $DEBUG; + X } + X } + X print "----------------------------------------------\n" if $DEBUG; + X return (join("/",$dir,$fiche),@temp_header) if $max >= 0; + X} + X + Xsub value_type { + X local($content,$val,%accepted) = @_; + X + X if((defined $content) && (defined %accepted)) { + X return $val*$accepted{$content} if defined $accepted{$content}; + X $content =~ s#/.*$#/*#; + X return (defined $accepted{$content})?($val*$accepted{$content}):-1; + X } else { + X if(defined $content) { return 0.1; } + X else { return (defined %accepted)?0.1:1.0; } + X } + X} + X + Xsub value_language { + X local($content,%accepted) = @_; + X + X if((!defined $content) || (!defined %accepted)) { + X if(!defined $content) { + X return (!defined %accepted)?1.0:0.1; + X } else { return 0.1; } + X } else { + X return $accepted{$content} if defined $accepted{$content}; + X $content =~ s/_.*$//; + X return (defined $accepted{$content})?$accepted{$content}:-1; + X } + X} + X + Xsub value_encoding { + X local($content,%accepted) = @_; + X + X if(!defined %accepted) { + X if(defined $content) { + X if("#8bit#7bit#binary#" =~ /#$content#/) { return 1; } + X else { return 0.1;} + X } else { return 1;} + X } else { + X if("#8bit#7bit#binary#" =~ /#$content#/) { + X return 0.1; + X } else { + X return (defined $accepted{$content})? + X $accepted{$content}:-1; + X } + X } + X} + X + Xsub scan_header { + X local($headers,*sstypes) = @_; + X + X @list = split("\377",$headers); + X foreach (@list) { + X @virg = split(','); + X foreach $i (@virg) { + X if($i =~ /^\s*([^;\s]*).*q\s*=\s*(.*)\b/) { + X $sstypes{$1} = $2; + X } else { + X $i =~ /^\s*([^;\s]*)/; + X $sstypes{$1} = 1 if $1 ne ""; + X } + X } + X } + X} + X + X1; + SHAR_EOF + chmod +x 'multi.pl' + fi # end of overwriting check + if test -f 'local_conf' + then + echo shar: will not over-write existing file "'local_conf'" + else + sed 's/^X//' << \SHAR_EOF > 'local_conf' + X# NEW DIRECTIVE for local.conf + X# + X# addtype MIME type suffix value + X# + Xaddtype text/html html 0.99 + Xaddtype text/x-html3 html3 1.0 + X# + X# language language suffix + X# + Xlanguage fr fr + Xlanguage en eng + X# + Xencoding x-compress Z + Xencoding 8bit html3 + X# + X# WARNING: + X# require these 2 lines in local.conf + X# + Xencoding 8bit html + Xencoding 7bit txt + X# + SHAR_EOF + fi # end of overwriting check + if test -f 'README' + then + echo shar: will not over-write existing file "'README'" + else + sed 's/^X//' << \SHAR_EOF > 'README' + X + X I've tried to implement multi selection in Plexus. + X + X Because I've looked at libwww2.17, it's C style and *not* Perl style :-( + X + X Actually, I've some problems with the implementation of multi-selection in + Xlibwww2.17 and CERN httpd3.0, I've mailed my patches to "httpd@info.cern.ch" + Xand wait for confirmation, fatally this version has probably many bugs. + X + X It's better to put it in "unsupported". + X + XCharacteristics : + X + X * this sub must be called when the last suffix is "multi". Example + X + XGET /welcome.multi + X + X * add line "addtype" in "local.conf", and "sub p_addtype" in plexus. + X + X# + X# addtype MIME type suffix value + X# + X + X * add line "language" in "local.conf", and "sub p_language" in plexus. + X + X# + X# language language suffix + X# + X + X * REQUIRE these two lines in "local.conf", actually not defined + X + X# + Xencoding 8bit html + Xencoding 7bit txt + X# + X + XExample : + X + Xmoulon% ls /moulon/Public/www/test + Xwelcome.fr.html welcome.fr.html3.Z welcome.html3 + Xwelcome.fr.html.Z welcome.html + Xwelcome.fr.html3 welcome.html.Z + Xmoulon% test_multi.pl + X---------------------------------------------- + XAccept : text/html; q=1.0,text/plain + XAccept-Language : it; q=0.4,de + XAccept-Encoding : x-gzip + X.............................................. + Xwelcome.fr.html 0.000000 text/html 8bit fr + Xwelcome.fr.html.Z 0.000000 text/html x-compress fr + Xwelcome.fr.html3 0.000000 text/x-html3 8bit fr + Xwelcome.fr.html3.Z 0.000000 text/x-html3 x-compress fr + Xwelcome.html 0.009900 text/html 8bit + Xwelcome.html.Z 0.000000 text/html x-compress + Xwelcome.html3 0.000000 text/x-html3 8bit + X---------------------------------------------- + XSelection : /moulon/Public/www/test/welcome.html + XHeader line : Content-Type: text/html + XContent-Encoding: 8bit + X---------------------------------------------- + XAccept : text/x-html3 + XAccept-Language : fr; q=0.6, it; q=0.4,de + XAccept-Encoding : x-compress + X.............................................. + Xwelcome.fr.html 0.059400 text/html 8bit fr + Xwelcome.fr.html.Z 0.594000 text/html x-compress fr + Xwelcome.fr.html3 0.060000 text/x-html3 8bit fr + Xwelcome.fr.html3.Z 0.600000 text/x-html3 x-compress fr + Xwelcome.html 0.009900 text/html 8bit + Xwelcome.html.Z 0.099000 text/html x-compress + Xwelcome.html3 0.010000 text/x-html3 8bit + X---------------------------------------------- + XSelection : /moulon/Public/www/test/welcome.fr.html3.Z + XHeader line : Content-Type: text/x-html3 + XContent-Language: fr + XContent-Encoding: x-compress + Xmoulon% + X + X + XBugs : + X + X 1) *NOT TESTED* + X + X 2) Accept: it try the exact match then only subtypes. + XExample, if the MIME type is "image/gif" it try "Accept: image/gif" + Xthen "Accept: image/*" (if it has received this line), it don't check + X"Accept: image/jpeg" ... , "Accept: */*" or "Accept: *" + X + X 3) Accept-Language: it try the exact match ("Accept-Language: xx_yy") then + Xthe `general' language ("Accept-Language: xx"). If it receive + X"Accept-Language: en_US", it try "Accept-Language: en_US" then + X"Accept-Language: en", it don't know that "en" eq "" (default value) + X + X 4) Accept-Encoding: it try only the exact match. + X + X 5) many others ... + X + X + XGuy Decoux + SHAR_EOF + fi # end of overwriting check + cd .. + # End of shell archive + exit 0 + diff -c plexus/util/forms.pl:2.4 plexus/util/forms.pl:2.5 *** plexus/util/forms.pl:2.4 Wed Dec 7 17:51:30 1994 --- plexus/util/forms.pl Wed Dec 7 17:51:30 1994 *************** *** 1,6 **** # forms.pl -- Handle forms data # ! # forms.pl,v 2.4 1994/11/08 08:43:47 sanders Exp # # by Tony Sanders , June 1994 # --- 1,6 ---- # forms.pl -- Handle forms data # ! # forms.pl,v 2.5 1994/12/07 23:45:46 sanders Exp # # by Tony Sanders , June 1994 # *************** *** 65,70 **** --- 65,71 ---- local($from) = &main'hostname((unpack($main'sockaddr, $main'peeraddr))[2]); local(*form, $old); + &main'error('bad_request', 'No form data') if (!$main'body && !$query); &decode(($main'body || $query), *form, 1); $error = &verify($rest, *form); &main'error('bad_request', $error) if (defined($error)); *************** *** 81,86 **** --- 82,88 ---- print "Form: $subject\n"; print &main'resolve_header(*main'in_headers, 'From'); + print &main'resolve_header(*main'in_headers, 'Referer'); print &main'resolve_header(*main'in_headers, 'User-agent'); print "Hostname: $from\n"; print "URL: $url\n";