/[Search-Estraier]/trunk/Estraier.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Estraier.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 35 by dpavlin, Thu Jan 5 17:54:18 2006 UTC revision 36 by dpavlin, Thu Jan 5 21:51:54 2006 UTC
# Line 663  package Search::Estraier::Node; Line 663  package Search::Estraier::Node;
663    
664  use Carp qw/croak/;  use Carp qw/croak/;
665  use URI;  use URI;
666  use URI::Escape qw/uri_escape/;  use MIME::Base64;
667  use IO::Socket::INET;  use IO::Socket::INET;
668    
669  =head1 Search::Estraier::Node  =head1 Search::Estraier::Node
# Line 747  Specify name and password for authentica Line 747  Specify name and password for authentica
747  sub set_auth {  sub set_auth {
748          my $self = shift;          my $self = shift;
749          my ($login,$passwd) = @_;          my ($login,$passwd) = @_;
750          $self->{auth} = uri_escape( "$login:$passwd" );          $self->{auth} = encode_base64( "$login:$passwd" );
751  }  }
752    
753  =head2 status  =head2 status
# Line 784  sub shuttle_url { Line 784  sub shuttle_url {
784    
785          my $status = -1;          my $status = -1;
786    
787            warn $url;
788    
789          $url = new URI($url);          $url = new URI($url);
790          return unless ($url->scheme ne 'http' || ! $url->host || $url->port < 1);          return -1 unless ($url && $url->scheme && $url->scheme eq 'http' && $url->host && $url->port > 1);
791    
792          my ($host,$port,$query) = ($url->host, $url->port, $url->path);          my ($host,$port,$query) = ($url->host, $url->port, $url->path);
793    

Legend:
Removed from v.35  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.26