[Catalyst] line-ending inconsistency
Carl Franks
fireartist at gmail.com
Thu Feb 23 17:52:08 CET 2006
This is related to my line-ending patch a couple hours ago.
I'm sure it is, I just don't know how!
I'm using TT, and generating a page which has a couple of included templates.
I've temporarily changed Catalyst.pm so that it doesn't output the
content-length, and the body() that's filled by TT is replaced with
bytes::length($c->res->body)
So all that's output is the length of what would have been the body.
e.g. I've done this in the finalize_headers sub:
#$c->response->content_length( bytes::length( $c->response->body ) );
$c->res->body( bytes::length( $c->response->body ) );
If I run script/test.pl I get the output 4935
If I run script/cgi.pl through apache I get the output 5507
If I run script/server.pl I get the output 4995
These numbers don't change at all regardless of whether the TT
template file (and included files) are all unix line-endings or all
windows line-endings.
I don't understand at all how the exact same source can be 3 different
lengths depending on which server it's running under.
The reason it matters, though, is under apache the last few lines of
html are being dropped, which messes up the browser display.
It definitely isn't browser related, because I get the same result if
I retrieve the source with wget.
I'm using catalyst-5.64 (but there doesn't seem any likely fixes in
the 5.65 changelog)
Template 2.14 (xs)
perl 5.8.8
apache 2.0.45
win xp sp2
Any ideas?
Cheers,
Carl
More information about the Catalyst
mailing list