Changeset 29

Show
Ignore:
Timestamp:
02/04/08 21:52:15 (6 years ago)
Author:
lfayer
Message:

return referer from ServerVariables?. Supports both REFERER and REFERRER. refs #12

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Mungo/Request.pm

    r26 r29  
    140140    return $self->{'Mungo'}->{'Apache::Request'}->hostname; 
    141141  } 
     142  elsif( ($var eq 'REFERER') || ($var eq 'REFERRER') ) { 
     143    my $r = $self->{'Mungo'}->{'Apache::Request'}; 
     144    return $r->can('headers_in') ? $r->headers_in->get('Referer') : 
     145                                   $r->header_in('Referer'); 
     146  } 
    142147  return undef; 
    143148}