/[Search-Estraier]/trunk/lib/Search/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/lib/Search/Estraier.pm

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

revision 69 by dpavlin, Sun Jan 8 16:49:53 2006 UTC revision 77 by dpavlin, Mon Jan 16 21:34:14 2006 UTC
# Line 4  use 5.008; Line 4  use 5.008;
4  use strict;  use strict;
5  use warnings;  use warnings;
6    
7  our $VERSION = '0.03_1';  our $VERSION = '0.04_1';
8    
9  =head1 NAME  =head1 NAME
10    
# Line 1418  sub shuttle_url { Line 1418  sub shuttle_url {
1418    
1419          $req->headers->header( 'Host' => $url->host . ":" . $url->port );          $req->headers->header( 'Host' => $url->host . ":" . $url->port );
1420          $req->headers->header( 'Connection', 'close' );          $req->headers->header( 'Connection', 'close' );
1421          $req->headers->header( 'Authorization', 'Basic ' . $self->{auth} );          $req->headers->header( 'Authorization', 'Basic ' . $self->{auth} ) if ($self->{auth});
1422          $req->content_type( $content_type );          $req->content_type( $content_type );
1423    
1424          warn $req->headers->as_string,"\n" if ($self->{debug});          warn $req->headers->as_string,"\n" if ($self->{debug});
# Line 1432  sub shuttle_url { Line 1432  sub shuttle_url {
1432    
1433          warn "## response status: ",$res->status_line,"\n" if ($self->{debug});          warn "## response status: ",$res->status_line,"\n" if ($self->{debug});
1434    
         return -1 if (! $res->is_success);  
   
1435          ($self->{status}, $self->{status_message}) = split(/\s+/, $res->status_line, 2);          ($self->{status}, $self->{status_message}) = split(/\s+/, $res->status_line, 2);
1436    
1437            return -1 if (! $res->is_success);
1438    
1439          $$resbody .= $res->content;          $$resbody .= $res->content;
1440    
1441          warn "## response body:\n$$resbody\n" if ($resbody && $self->{debug});          warn "## response body:\n$$resbody\n" if ($resbody && $self->{debug});
# Line 1535  sub set_link { Line 1535  sub set_link {
1535          $reqbody .= '&credit=' . $credit if ($credit > 0);          $reqbody .= '&credit=' . $credit if ($credit > 0);
1536    
1537          $self->shuttle_url( $self->{url} . '/_set_link',          $self->shuttle_url( $self->{url} . '/_set_link',
1538                  'text/plain',                  'application/x-www-form-urlencoded',
1539                  $reqbody,                  $reqbody,
1540                  undef                  undef
1541          ) == 200;          ) == 200;

Legend:
Removed from v.69  
changed lines
  Added in v.77

  ViewVC Help
Powered by ViewVC 1.1.26