Re: Stripping white space from HTML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Great news!  This was fixed by changing the push line to:

push @out, $_ unless /^\s*$/;

Thanks a lot for everyone's help.

- 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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux