You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Robert Landrum <rl...@aol.net> on 2008/04/07 20:46:02 UTC

[mp2] HTML::Mason and Missing content

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





---------------------------------------------------------------------------------
foo_fixed.mc:
-- 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 --


Re: [mp2] HTML::Mason and Missing content

Posted by Robert Landrum <rl...@aol.net>.
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


Re: [mp2] HTML::Mason and Missing content

Posted by Felipe de Jesús Molina Bravo <fj...@gmail.com>.
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 <rl...@aol.net>:
>
> 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 --
> <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
>
>
>
>
>
>
> ---------------------------------------------------------------------------------
> foo_fixed.mc:
> -- 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 --
>
>