Skip Menu |

This queue is for tickets about the Apache2-Pod CPAN distribution.

Report information
The Basics
Id: 31102
Status: resolved
Estimated: 6 hours (360 min)
Worked: 40 min
Priority: 1/
Queue: Apache2-Pod

People
Owner: MARKLE [...] cpan.org
Requestors: Philip.Cole [...] sophos.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.24
Fixed in: 0.25



Subject: Apache2-Pod-HTML bug
Date: Fri, 30 Nov 2007 12:07:52 +0000
To: bug-Apache2-Pod [...] rt.cpan.org
From: Philip.Cole [...] sophos.com
Hello, I've been involved in migrating our webservers from Apache 1.3 to Apache 2.2 on RedHat Enterprise Linux 5 and I've come up against a bug in Apache2::Pod::HTML which I believe you wrote and maintain. On 2 lines in that file, you include the line $r->send_http_header which no longer exists with an Apache2::RequestRec object. Apache2 doesn't require the line and I found that the module works fine with the lines commented out. I have included the output from diff -u below. --- Apache2/Pod/HTML-fixed.pm 2007-11-30 11:57:56.000000000 +0000 +++ Apache2/Pod/HTML.pm 2007-01-05 01:46:05.000000000 +0000 @@ -117,7 +117,7 @@ if ( $r->path_info eq '/auto.css' ) { $r->content_type( 'text/css' ); - #$r->send_http_header; + $r->send_http_header; $r->print( _css() ); return Apache2::Const::OK; } @@ -170,7 +170,7 @@ }; } $r->content_type('text/html'); - #$r->send_http_header; + $r->send_http_header; $r->print( $body ); return Apache2::Const::OK; Regards Phil -- Philip Cole Perl Programmer, Global Web Group, Sophos Tel: 01235 559933 Web: http://www.sophos.com Sophos - security and control Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20.
From: theronl [...] gmail.com
Thanks for the info and patch. I will put out a new revision with the bug fix as soon as I can. Look for it over the next week or so. -Theron On Fri Nov 30 07:09:16 2007, Philip.Cole@sophos.com wrote: Show quoted text
> Hello, > > I've been involved in migrating our webservers from Apache 1.3 to Apache > 2.2 on RedHat Enterprise Linux 5 and I've come up against a bug in > Apache2::Pod::HTML which I believe you wrote and maintain. > > On 2 lines in that file, you include the line $r->send_http_header which > no longer exists with an Apache2::RequestRec object. Apache2 doesn't > require the line and I found that the module works fine with the lines > commented out. I have included the output from diff -u below. > > > --- Apache2/Pod/HTML-fixed.pm 2007-11-30 11:57:56.000000000 > +0000 > +++ Apache2/Pod/HTML.pm 2007-01-05 01:46:05.000000000 +0000 > @@ -117,7 +117,7 @@ > > if ( $r->path_info eq '/auto.css' ) { > $r->content_type( 'text/css' ); > - #$r->send_http_header; > + $r->send_http_header; > $r->print( _css() ); > return Apache2::Const::OK; > } > @@ -170,7 +170,7 @@ > }; > } > $r->content_type('text/html'); > - #$r->send_http_header; > + $r->send_http_header; > $r->print( $body ); > > return Apache2::Const::OK; > > > Regards > > Phil >
Err why did I get a reminder to this bug? I do not remember adding one to my own...
Subject: Re: [rt.cpan.org #31102] Apache2-Pod-HTML bug
Date: Thu, 13 Dec 2007 09:16:28 +0000
To: bug-Apache2-Pod [...] rt.cpan.org
From: Philip.Cole [...] sophos.com
No idea. I didn't set/change anything either. Phil "Zak B. Elep via RT" <bug-Apache2-Pod@rt.cpan.org> 13/12/2007 02:42 Please respond to bug-Apache2-Pod@rt.cpan.org To Philip.Cole@sophos.com cc Subject [rt.cpan.org #31102] Apache2-Pod-HTML bug <URL: http://rt.cpan.org/Ticket/Display.html?id=31102 > Err why did I get a reminder to this bug? I do not remember adding one to my own... -- Philip Cole Perl Programmer, Global Web Group, Sophos Tel: 01235 559933 Web: http://www.sophos.com Sophos - security and control Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20.
Hi - this was not fixed and has been stalled for more than a year. I think the author was using Apache::compat, which apparently is no longer part of any distribution of mod_perl2. (I've asked in the modperl mailing list about that.) And, the submitted diff -u patch was backwards, adding the line that should have been removed. Here is the correct patch, for both Apache2::Pod::HTML and Apache2::Pod::Text, attached. It should be a simple fix to update for CPAN. Do you need beer? Mark
Index: lib/Apache2/Pod/HTML.pm =================================================================== --- HTML.pm.orig 2009-01-27 15:35:24.000000000 -0800 +++ HTML.pm 2009-01-27 15:35:36.000000000 -0800 @@ -117,7 +117,6 @@ if ( $r->path_info eq '/auto.css' ) { $r->content_type( 'text/css' ); - $r->send_http_header; $r->print( _css() ); return Apache2::Const::OK; } @@ -170,7 +169,6 @@ }; } $r->content_type('text/html'); - $r->send_http_header; $r->print( $body ); return Apache2::Const::OK; Index: lib/Apache2/Pod/Text.pm =================================================================== --- Text.pm.orig 2009-01-27 15:35:18.000000000 -0800 +++ Text.pm 2009-01-27 15:35:45.000000000 -0800 @@ -60,7 +60,6 @@ $parser->parse_string_document( $document ); } $r->content_type('text/plain'); - $r->send_http_header; $r->print( $str ); return Apache2::Const::OK;
Subject: RE: [rt.cpan.org #31102] Apache2-Pod-HTML bug
Date: Wed, 28 Jan 2009 09:15:30 +0000
To: "bug-Apache2-Pod [...] rt.cpan.org" <bug-Apache2-Pod [...] rt.cpan.org>
From: Philip Cole <philip.cole [...] sophos.com>
Hi, Thanks for not forgetting this - I'd rather put it to the back of my mind... Sorry the patch was backwards - didn't notice that at the time. No beer required :) Phil Show quoted text
-----Original Message----- From: MARKLE via RT [mailto:bug-Apache2-Pod@rt.cpan.org] Sent: 27 January 2009 23:43 To: Philip Cole Subject: [rt.cpan.org #31102] Apache2-Pod-HTML bug <URL: https://rt.cpan.org/Ticket/Display.html?id=31102 > Hi - this was not fixed and has been stalled for more than a year. I think the author was using Apache::compat, which apparently is no longer part of any distribution of mod_perl2. (I've asked in the modperl mailing list about that.) And, the submitted diff -u patch was backwards, adding the line that should have been removed. Here is the correct patch, for both Apache2::Pod::HTML and Apache2::Pod::Text, attached. It should be a simple fix to update for CPAN. Do you need beer? Mark Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20.
On Wed Jan 28 08:13:36 2009, Philip.Cole@sophos.com wrote: Show quoted text
> Hi, > > Thanks for not forgetting this - I'd rather put it to the back > of my mind... > > Sorry the patch was backwards - didn't notice that at > the time. > > No beer required :)
I was referring to Theron Lewis, who seems to have abandoned this package. I will try to take it over. Mark
Fixed in 0.25, I am now co-maintainer of the package. I don't know how much work I'll do on it, but at least it works without apache2 compat now.