[plug] Apache problem
Kenworthy Family
billk at opera.iinet.net.au
Mon Jan 3 12:38:50 WST 2000
Thanks Russ, am saving this one and will write a few scripts incorporating it so
its ready next time I need to remove the DOS carriage returns. It seems to crop
up at inconvenient times when its easier to do it manually than set up a special
script.
BillK
** and for Paul Wilson - was DOS <cr> the problem or are you still looking?
russ wrote:
> On Sun, 02 Jan 2000, Kenworthy Family wrote:
> > I had the same problem with perl scripts created in a windows environment
> > that generated html output. Apache/Perl choked on the dos carriage returns
> > - I think the problem was not apache but perl under linux. I manually
> > deleted them (cr) in a linux editor (one day i'll have to install dos2unix
> > or similar)
>
> Somebody on this list gave a nice little perl script for
> this:
>
> while( <> )
> {
> s/\r//;
> print;
> }
>
> Can't remember the author, but it's simple and works well
> for me. :)
>
> >and all was fine - make sure you get em all, as it only
> took one > to cause a problem!
> >
> > BillK
> >
> >
> > Paul Wilson wrote:
> >
> > > > > BTW, the message 'Premature end of script headers' -- does that also
> > > imply
> > > > > that the HTML may not be complete? I'd been assuming that the mime
> > > header
> > > > > was somehow wrong. Maybe I been too blinkered !!
> > > >
> > > > Are you sending a blank line after headers?
> > > > printf("Content-type: text/html%c%c",LF,LF);
> > >
> > > Yup, certainly am.
> > >
> > > Paul
> --
> Regards
> russ
>
> http://www.powerstech.com/hex
More information about the plug
mailing list