[ic] Link.pm updates, please commit

Grant emailgrant at gmail.com
Fri Nov 16 09:47:27 EST 2007


> > 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.

Even if no one else on the list is using this, I think these changes
should be committed with the possible exception of the blank line
remover.  These are good changes and I think this is the first time
Link.pm is made production-worthy.

- Grant


More information about the interchange-users mailing list