Changeset 50

Show
Ignore:
Timestamp:
08/19/09 20:35:06 (5 years ago)
Author:
clinton
Message:

Add IsSecure? convenience method to Request

Files:

Legend:

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

    r44 r50  
    293293} 
    294294 
     295=head2 $bool = $req->IsSecure(); 
     296 
     297Returns true or false depending on whether the request came in over HTTPS. 
     298 
     299=cut 
     300 
     301sub IsSecure { 
     302    my $self = shift; 
     303    my $r = $self->{Mungo}->{'Apache::Request'}; 
     304    return $r->can('headers_in') ? $r->headers_in->get('X-SSL') : $r->header_in('X-SSL'); 
     305} 
     306 
    295307=head2 $value = $Request->Header('User-Agent'); 
    296308