/[pdpsoft]/nl.nikhef.pdp.fetchcrl/trunk/TrustAnchor.pm
ViewVC logotype

Diff of /nl.nikhef.pdp.fetchcrl/trunk/TrustAnchor.pm

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

revision 2803 by davidg, Tue Nov 10 15:46:54 2015 UTC revision 3107 by davidg, Fri Sep 9 15:32:11 2016 UTC
# Line 112  sub loadAnchor($$) { Line 112  sub loadAnchor($$) {
112      @{$self->{"crlurls"}} = ();      @{$self->{"crlurls"}} = ();
113      open CRLURL,"$path$basename$suffix" or      open CRLURL,"$path$basename$suffix" or
114        $::log->err("Error reading crl_url $path$basename$suffix: $!") and return 0;        $::log->err("Error reading crl_url $path$basename$suffix: $!") and return 0;
115        $self->{"filename"} = "$path$basename$suffix";
116      my $urllist;      my $urllist;
117      while (<CRLURL>) {      while (<CRLURL>) {
118        /^\s*([^#\n]+).*$/ and my $url = $1 or next;        /^\s*([^#\n]+).*$/ and my $url = $1 or next;
# Line 134  sub loadAnchor($$) { Line 135  sub loadAnchor($$) {
135      $info->read( $path . $basename . $suffix ) or      $info->read( $path . $basename . $suffix ) or
136        $::log->err("Error reading info $path$basename$suffix", $info->errstr)        $::log->err("Error reading info $path$basename$suffix", $info->errstr)
137          and return 0;          and return 0;
138        $self->{"filename"} = "$path$basename$suffix";
139    
140      $info->{_}->{"crl_url"} and $info->{_}->{"crl_url.0"} and      $info->{_}->{"crl_url"} and $info->{_}->{"crl_url.0"} and
141        $::log->err("Invalid info for $basename: crl_url and .0 duplicate") and        $::log->err("Invalid info for $basename: crl_url and .0 duplicate") and
# Line 434  sub retrieveHTTP($$) { Line 436  sub retrieveHTTP($$) {
436      }      }
437    }    }
438    # set request cache control if specified as valid in config    # set request cache control if specified as valid in config
439    if ( defined $cnf->{_}->{cache_control_request} ) {    if ( defined $::cnf->{_}->{cache_control_request} ) {
440      if ( $cnf->{_}->{cache_control_request} =~ /^\d+$/ ) {      $::log->verb(5,"Setting request cache-control to ".
441                       $::cnf->{_}->{cache_control_request});
442        if ( $::cnf->{_}->{cache_control_request} =~ /^\d+$/ ) {
443        $ua->default_header('Cache-control' =>        $ua->default_header('Cache-control' =>
444                            "max-age=".$cnf->{_}->{cache_control_request} );                            "max-age=".$::cnf->{_}->{cache_control_request} );
445      } else {      } else {
446        die "Request cache control is invalid (not a number)\n";        die "Request cache control is invalid (not a number)\n";
447      }      }

Legend:
Removed from v.2803  
changed lines
  Added in v.3107

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28