tools/page-loader/RegistryPrefork.pm

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 # This Source Code Form is subject to the terms of the Mozilla Public
     2 # License, v. 2.0. If a copy of the MPL was not distributed with this
     3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 package ModPerl::RegistryPrefork;
     7 # RegistryPrefork.pm originally from
     8 # http://perl.apache.org/docs/2.0/user/porting/compat.html#Code_Porting
     9 # backported for mod_perl <= 1.99_08
    11 use strict;
    12 use warnings FATAL => 'all';
    14 our $VERSION = '0.01';
    16 use base qw(ModPerl::Registry);
    18 use File::Basename ();
    20 use constant FILENAME => 1;
    22 sub handler : method {
    23     my $class = (@_ >= 2) ? shift : __PACKAGE__;
    24     my $r = shift;
    25     return $class->new($r)->default_handler();
    26 }
    28 sub chdir_file {
    29     my $file = @_ == 2 ? $_[1] : $_[0]->[FILENAME];
    30     my $dir = File::Basename::dirname($file);
    31     chdir $dir or die "Can't chdir to $dir: $!";
    32 }
    34 1;
    35 __END__

mercurial