You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Dave Viner <da...@pobox.com> on 2006/09/14 07:05:36 UTC

appended "success" document

Hi,

I'm trying to write a simple apache module in perl and have apparent  
success.  When i request the page from my server, I get the proper  
HTML output.  However, appended to the end of the proper HTML, is a  
second HTML document that says:

.. my html ...
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>200 OK</title>
</head><body>
<h1>OK</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
webmaster@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.0.58 (Unix) PHP/5.1.4 DAV/2  
mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 Server at  
lalala.localhost.localhost Port 80</address>
</body></html>

My handler is quite simple, and returns Apache2::Const::OK.  What  
causes this extra document to be appended and how do I prevent it?

I'm using modperl 2.0.2, apache 2.0.58, and perl 5.8.8.

thanks
dave


Re: appended "success" document

Posted by Dave Viner <da...@pobox.com>.
thanks all for the responses...

my problem turned out to be that i was returning  
Apache2::Const::HTTP_OK instead of Apache2::Const::OK from my  
handler.  This caused the document to be appended...

for what it's worth, there was no additional information in the error  
log... but i guess that's good.  apache was just chastising me for  
being an idiot. :D

dave

On Sep 14, 2006, at 9:52 AM, Perrin Harkins wrote:

> On Wed, 2006-09-13 at 22:05 -0700, Dave Viner wrote:
>> <p>More information about this error may be available
>> in the server error log.</p>
>
> Did you look in the error log?
>
>> My handler is quite simple, and returns Apache2::Const::OK.  What
>> causes this extra document to be appended and how do I prevent it?
>
> It just means that an error occurred after you had sent your content.
> Find out what the error was.
>
> - Perrin
>


Re: appended "success" document

Posted by Perrin Harkins <pe...@elem.com>.
On Wed, 2006-09-13 at 22:05 -0700, Dave Viner wrote:
> <p>More information about this error may be available
> in the server error log.</p>

Did you look in the error log?

> My handler is quite simple, and returns Apache2::Const::OK.  What  
> causes this extra document to be appended and how do I prevent it?

It just means that an error occurred after you had sent your content.
Find out what the error was.

- Perrin