Show
Ignore:
Timestamp:
06/07/08 19:57:42 (5 years ago)
Author:
nothingmuch
Message:

request_builder handlers _build_hostname

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/branches/lazy_request/lib/HTTP/Engine/RequestBuilder.pm

    r13370 r13397  
    22use Moose; 
    33use CGI::Simple::Cookie; 
     4 
     5use IO::Socket qw[AF_INET inet_aton]; 
    46 
    57# tempolary file path for upload file. 
     
    8284        grep { /^(?:HTTP|CONTENT|COOKIE)/i } keys %ENV  
    8385    }); 
     86} 
     87 
     88sub _build_hostname { 
     89    my ( $self, $req ) = @_; 
     90    $ENV{REMOTE_HOST} || gethostbyaddr( inet_aton( $req->address ), AF_INET ); 
    8491} 
    8592