2 ===================================================================
3 RCS file: /home/short/pserver/cvs/MyWeb/Web.pm,v
4 retrieving revision 1.15
5 diff -u -p -r1.15 Web.pm
6 --- Web.pm 10 Nov 2005 06:39:24 -0000 1.15
7 +++ Web.pm 5 Dec 2005 13:51:46 -0000
8 @@ -204,11 +204,44 @@ my($class,%args)=@_;
10 $W->{"headers_in"}=$W->{"r"}->headers_in();
11 Wrequire 'My::Hash::Merge';
12 + my $headers_in_orig=$W->{"headers_in"};
13 $W->{"headers_in"}=My::Hash::Merge->new(
15 + # Proper ordering - "Accept" is overriding!
17 "_remote_ip"=>sub { return $W->{"r"}->connection()->remote_ip(); },
19 + return our $r||=do {
20 + my $accept_string=$headers_in_orig->{"Accept"};
21 + if ($accept_string && (my $gecko_version=$W->{"browser"}->gecko_version())) {
22 + # Since Gecko "rv:1.8", that means since Firefox-1.5.
23 + if ("001-008" le join("-",map((sprintf("%03d",$_)),split(/[.]/,$gecko_version)))) {
24 + my $http_headers=HTTP::Headers->new($accept_string);
25 + my $format=HTTP::Negotiate::choose([
27 + "image/catch-missing-svg-type", # ID
29 + "image/catch-missing-svg-type", # Content-Type
32 + "image/svg+xml", # ID
34 + "image/svg+xml", # Content-Type
37 + if ($format && $format eq "image/catch-missing-svg-type") {
38 + # Image requests: "image/png,*/*;q=0.5"
39 + # and thus "image/png" is assigned the same priority.
40 + # FIXME: RFC 2068 (HTTP/1.1) does not specify the behavior!
41 + # HTTP::Negotiate fortunately follows the ordering preferences.
42 + $accept_string="image/svg+xml,".$accept_string;
52 Wrequire 'My::Hash::Readonly';
53 $W->{"headers_in"}=My::Hash::Readonly->new($W->{"headers_in"});
55 ===================================================================
56 RCS file: /home/short/pserver/cvs/MyWeb/Hash/Merge.pm,v
57 retrieving revision 1.1
58 diff -u -p -r1.1 Merge.pm
59 --- Hash/Merge.pm 18 Sep 2005 06:43:14 -0000 1.1
60 +++ Hash/Merge.pm 5 Dec 2005 13:51:46 -0000
61 @@ -40,19 +40,16 @@ my($class,@parents)=@_;
65 +# Multiplicity is permitted, first one is chosen.
72 for my $parent (@{$self->{"parents"}}) {
73 next if !exists $parent->{$key};
77 - # 0 IS allowed here.
78 - cluck "Duplicity ($count-icity) for key: $key" if $count>=2;
79 $first||=$self->{"parents"}[0];