You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Marc Boorshtein <mb...@gmail.com> on 2007/01/22 20:06:40 UTC

Stream Filter Generating "Resource Unavailable" errors....

Hello,

I've got an input stream filter built on Solaris 8 against IHS 6.1
that is for some reason generating the following errors:

[Mon Jan 22 14:01:59 2007] [error] Apache2::Filter::read: (11)
Resource temporarily unavailable at
/cookiefilter/ihs61/perl-lib/COMP/POC/CookieFilter/Inbound.pm line 31
[Mon Jan 22 14:02:09 2007] [error] Apache2::Filter::read: (70007) The
timeout specified has expired at
/cookiefilter/ihs61/perl-lib/COMP/POC/CookieFilter/Inbound.pm line 31

The filter works just fine, but these errors are in every request.
below is the applicable part of the filter:

my $buffer;
  	my $done = 0;
	  	while ( ! $done ) {
	  		#eval {
	  			$done = ! $f->read($buffer, BUFF_LEN);
	  		#};
	        if ($buffer =~ /^Cookie.*/) {
				#warn("Cookies : $_");      	
				my $cookies = $buffer;
				#warn("IN prechomp-Cookies : $cookies");
					
				#warn("IN Cookies : $cookies");
				my @splitheader = split(/:/,$cookies);
				my $aftersplit = "";
				
				my $len = @splitheader;
				my $i;
				
				for ($i = 1;$i<$len;$i++) {
					$aftersplit = $aftersplit . $splitheader[$i];
					if ($i != ($len - 1)) {
						$aftersplit = $aftersplit . ":";
					}
				}
				
				
				#warn("After split: \"$aftersplit\"");
				my $renamed_cookies = rename_cookies2($aftersplit);
				#warn("IN Renamed Cookies : $renamed_cookies");
				
				$f->print("Cookie:$renamed_cookies");			
	      	} else {
	      		$f->print($buffer);
	      	}
	    }
    return Apache2::Const::OK;

The code functionally works OK, but the IHS (Apache) error log is
filled with the above errors.  I've found this error in relationship
to scokets, but not with filters.  Any help would be greatly
appreciated.

Thanks
Marc