[ic] Link.pm updates, please commit

Jon Jensen jon at endpoint.com
Tue Nov 13 23:36:54 EST 2007

On Mon, 12 Nov 2007, Grant wrote:

> I've made three changes to the current Interchange::Link which are 
> working out great.  The first one allows a proper 404 to be returned:
> close (SOCK) or die "close: $!\n";
> - return Apache2::Const::OK;
> + return Apache2::Const::NOT_FOUND
> The second removes all blank lines from IC's HTML/CSS output:
> while( <SOCK> ) {
> - push @out, $_;
> + push @out, $_ if /\S/;
> I realize that not everyone will want the blank lines removed from
> their HTML/CSS output, so maybe someone can slap together a quick
> variable in the module that sets it up as an option?
> The third and most important prevents the frequent segmentation faults
> and intermittent "Connection reset by peer" errors I had previously
> been plagued with:
> - $SIG{PIPE} = sub { die_page($r); };
> + $SIG{PIPE} = 'IGNORE';
> The entire die_page sub can also be removed.  For a little more info
> on this, just removing the $r->content_type and $r->print sections
> from the die_page sub will prevent the seg faults, but using 'IGNORE'
> as above also prevents the intermittent "Connection reset by peer"
> errors.

Who else besides Grant is using Interchange::Link and could weigh in on 
his proposed changes here? It'd be nice to have other users test these.


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list