httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant <emailgr...@gmail.com>
Subject Re: [users@httpd] Stripping white space from HTML
Date Tue, 13 Mar 2007 15:40:08 GMT
> > >>> Right now all I want to do is eliminate all white space from my delivered
HTML.
> > >> mod_line_edit might be a better bet, perhaps with a LERewriteRule to
> > >> collapse any whitespace of more than one byte to a single space.
> > >
> > > I want to make sure I'm not mis-using the term "whitespace".  What I
> > > mean is I want to eliminate all completely blank lines from my
> > > delivered HTML.  Would you use mod_line_edit for that?
> > >
> > > Also, my system delivers HTML in a dynamic way like this:
> > >
> > > <Location />
> > >        SetHandler perl-script
> > >        PerlResponseHandler Interchange::Link
> > >        PerlOptions +GlobalRequest
> > >        PerlSetVar InterchangeServer /path/to/socket
> > > </Location>
> > >
> > > Should I be able to use something like mod_line_edit in conjunction?
> >
> > Why not just modify Interchange/Link.pm to not print blank lines? That
> > would seem to me to be the best solution. I'm not familiar with
> > Interchange::Link, but I just did a quick google and took a look at
> > http://preview.tinyurl.com/2f349n
> >
> > At the end of the "handler" subroutine you'll see to while loops that
> > print out the content...
>
> Nice.  Yeah, interchange is completely open source, I just don't know
> perl.  Matt did mention my not having access to the source code a
> couple times and I didn't correct him.  My mistake.
>
> So the content is printed here?
>
> while(  ) {
>      push @out, $_;
> }
>
> Can we filter the blank lines in there?

The latest version of Interchange::Link actually has this portion a
little different:

while( <SOCK> ) {
     push @out, $_;
}

Here's a link to the whole module.  Sorry about the long URL:

http://www.icdevgroup.org/cgi-bin/cvsweb/~checkout~/interchange/dist/src/mod_perl2/Interchange/Link.pm?rev=1.12;content-type=text%2Fplain

- Grant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message