[mp2] HTML::Mason and Missing content
am 07.04.2008 20:46:02 von Robert Landrum
We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2
that only affects a few of our files. I'm able to reproduce it reliably.
We have a custom handler method that handles all requests to our site by
passing them off to HTML::Mason (with exceptions for images, and the like).
On some pages, the first few lines of HTML output are missing. If I add
a newline to the very first line of the mason component, all of the
content appears (see below). This has led me to believe that the issue
is related to headers. Something is eating the first few lines of all
out our output up until the the first blank line.
Those lines however, do not appear in the header output of the request,
though. They just seem to disappear somewhere inside apache2.2.
Has anyone seen this problem before? We didn't experience it under MP1.
Thanks,
Rob
---------------------------------------------------------
foo.mc:
-- START --
Foo File
Testing Apache 2.2: <% $now %>
<%init>
my $now = scalar localtime;
%init>
<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0
%attr>
-- END --
Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:41:48 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
Perl/v5.8.7
Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:41:48 GMT
Client-Peer: XXXXXXXXXXXXXXX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
------------------------------------------------------------ ---------------------
foo_fixed.mc:
-- START --
Foo File
Testing Apache 2.2: <% $now %>
<%init>
my $now = scalar localtime;
%init>
<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0
%attr>
-- END --
Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:43:04 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
Perl/v5.8.7
Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:43:04 GMT
Client-Peer: XXXXXXXXXXXXXX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Title: Foo File
Foo File
Testing Apache 2.2: Mon Apr 7 14:43:04 2008
-- END --
Re: [mp2] HTML::Mason and Missing content
am 08.04.2008 04:11:47 von fjmolinabravo
------=_Part_20007_5184990.1207620707943
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi
how did you installed modperl ... static or dinamic?
It can be a solution (change from static to dinamic), maybe you help the
next link
http://www.masonhq.com/?FAQ:Installation#h-why_am_i_getting_ segmentation_faults__or_silently_failing_on_startup__
regards
felipe
2008/4/7, Robert Landrum :
>
> We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2
> that only affects a few of our files. I'm able to reproduce it reliably.
>
> We have a custom handler method that handles all requests to our site by
> passing them off to HTML::Mason (with exceptions for images, and the like).
>
> On some pages, the first few lines of HTML output are missing. If I add a
> newline to the very first line of the mason component, all of the content
> appears (see below). This has led me to believe that the issue is related
> to headers. Something is eating the first few lines of all out our output
> up until the the first blank line.
>
> Those lines however, do not appear in the header output of the request,
> though. They just seem to disappear somewhere inside apache2.2.
>
> Has anyone seen this problem before? We didn't experience it under MP1.
>
> Thanks,
>
> Rob
>
> ---------------------------------------------------------
> foo.mc:
> -- START --
>
>
> Foo File
>
>
> Testing Apache 2.2: <% $now %>
>
>
>
> <%init>
> my $now = scalar localtime;
> %init>
>
> <%attr>
> no_formatting=>1
> menubar=>0
> navbar=>0
> footer=>0
> subnav=>0
> %attr>
> -- END --
>
>
> Output:
> -- START --
> Connection: close
> Date: Mon, 07 Apr 2008 18:41:48 GMT
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
> Perl/v5.8.7
> Content-Type: text/html
> Client-Date: Mon, 07 Apr 2008 18:41:48 GMT
> Client-Peer: XXXXXXXXXXXXXXX
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
>
>
>
>
>
>
> ------------------------------------------------------------ ---------------------
> foo_fixed.mc:
> -- START --
>
>
>
> Foo File
>
>
> Testing Apache 2.2: <% $now %>
>
>
>
> <%init>
> my $now = scalar localtime;
> %init>
>
> <%attr>
> no_formatting=>1
> menubar=>0
> navbar=>0
> footer=>0
> subnav=>0
> %attr>
> -- END --
>
>
> Output:
> -- START --
> Connection: close
> Date: Mon, 07 Apr 2008 18:43:04 GMT
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
> Perl/v5.8.7
> Content-Type: text/html
> Client-Date: Mon, 07 Apr 2008 18:43:04 GMT
> Client-Peer: XXXXXXXXXXXXXX
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
> Title: Foo File
>
>
>
> Foo File
>
>
> Testing Apache 2.2: Mon Apr 7 14:43:04 2008
>
>
>
>
>
> -- END --
>
>
------=_Part_20007_5184990.1207620707943
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi
how did you installed modperl ... static or dinamic?
It can be a solution (change from static to dinamic), maybe you help the next link
regards
felipe
2008/4/7, Robert Landrum <>:
We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2 that only affects a few of our files. I'm able to reproduce it reliably.
We have a custom handler method that handles all requests to our site by passing them off to HTML::Mason (with exceptions for images, and the like).
On some pages, the first few lines of HTML output are missing. If I add a newline to the very first line of the mason component, all of the content appears (see below). This has led me to believe that the issue is related to headers. Something is eating the first few lines of all out our output up until the the first blank line.
Those lines however, do not appear in the header output of the request, though. They just seem to disappear somewhere inside apache2.2.
Has anyone seen this problem before? We didn't experience it under MP1.
Thanks,
Rob
---------------------------------------------------------
:
-- START --
<html>
<head>
<title>Foo File</title>
</head>
<body>
Testing Apache 2.2: <% $now %>
</body>
</html>
<%init>
my $now = scalar localtime;
</%init>
<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0
</%attr>
-- END --
Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:41:48 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3 Perl/v5.8.7
Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:41:48 GMT
Client-Peer: XXXXXXXXXXXXXXX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
------------------------------------------------------------ ---------------------
:
-- START --
<html>
<head>
<title>Foo File</title>
</head>
<body>
Testing Apache 2.2: <% $now %>
</body>
</html>
<%init>
my $now = scalar localtime;
</%init>
<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0
</%attr>
-- END --
Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:43:04 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3 Perl/v5.8.7
Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:43:04 GMT
Client-Peer: XXXXXXXXXXXXXX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Title: Foo File
<html>
<head>
<title>Foo File</title>
</head>
<body>
Testing Apache 2.2: Mon Apr 7 14:43:04 2008
</body>
</html>
-- END --
------=_Part_20007_5184990.1207620707943--
Re: [mp2] HTML::Mason and Missing content
am 08.04.2008 17:14:53 von Robert Landrum
Felipe de Jesús Molina Bravo wrote:
> Hi
>
> how did you installed modperl ... static or dinamic?
>
Dynamic... But I'm not getting segfaults.
The issue was caused by having PerlSendHeader On. Switching it to off,
the problem went away.
Rob