Changeset 18590

Show
Ignore:
Timestamp:
09/01/08 21:59:20 (5 years ago)
Author:
yappo
Message:

replace of unique key

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/trunk/lib/HTTP/Engine/Interface/ModPerl.pm

    r18269 r18590  
    6363); 
    6464 
     65has context_key => ( 
     66    is      => 'rw', 
     67    isa     => 'Str', 
     68); 
     69 
    6570no Moose; 
    6671 
     
    7176    my $class = shift; 
    7277    my $r     = shift; 
     78    my $server = $r->server; 
    7379 
    7480    # ModPerl is currently the only environment where the inteface comes 
    7581    # before the actual invocation of HTTP::Engine 
    7682 
    77     my $location = $r->location; 
    78     my $engine   = $HE{ $location }; 
     83    my $context_key = join ':', $server->server_hostname, $server->port, $r->location; 
     84    my $engine   = $HE{ $context_key }; 
    7985    if (! $engine ) { 
    80         $engine = $class->create_engine($r); 
    81         $HE{ $r->location } = $engine; 
     86        $engine = $class->create_engine($r, $context_key); 
     87        $HE{ $context_key } = $engine; 
    8288    } 
    8389 
    8490    $engine->interface->apache( $r ); 
     91    $engine->interface->context_key( $context_key ); 
    8592 
    86     my $server = $r->server; 
    8793    my $connection = $r->connection; 
    8894