Skip Menu |
 

This queue is for tickets about the HTML-Mason CPAN distribution.

Report information
The Basics
Id: 23535
Status: rejected
Priority: 0/
Queue: HTML-Mason

People
Owner: Nobody in particular
Requestors: emazep [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.33
  • 1.34
  • 1.35
Fixed in: (no value)



Subject: $m->flush_buffer bypasses the <%filter> section in a higher level component.
Download (untitled) / with headers
text/plain 1.6k
The presence of a $m->flush_buffer statement in a lower level component causes the <%filter> section in a higher level component to be bypassed. Here is a very simple way to reproduce this bug. Put both the attached files ("index.html" and "autohandler") in a Mason dir. index.html simply contains: ----------------------------------- First chunk from index.html % $m->flush_buffer; Second chunk from index.html ----------------------------------- and autohandler simply contains: ----------------------------------- % $m->call_next; <%filter> s/First chunk from index.html/*First chunk seen by autohandler!* - /; s/Second chunk from index.html/*Second chunk seen by autohandler!*/; </%filter> ----------------------------------- Now try to access index.html from your browser and you'll see: First chunk from index.html *Second chunk seen by autohandler!* instead of the expected output: *First chunk seen by autohandler!* - *Second chunk seen by autohandler!* Now comment out $m->flush_buffer; in index.html and you'll get the above mentioned expected output (so this confirms that the problem is caused by $m->flush_buffer). This bug was *not* present in HTML-Mason-1.32 (where you got exactly the expected output), so there is a possibility that it was introduced in HTML-Mason-1.33 by this somewhat related fix: 1.33 May 28, 2006 [ BUG FIXES ] - If $m->flush_buffer() was called when there was a filter somewhere in the component chain, the flush did nothing. Task id #596. The above mentioned tests have been executed in the following environment: Mac OS X 10.4.8 perl 5.8.8 Apache 2.0.2 mod_perl 2.0.2 HTML::Mason 1.32, 1.33, 1.34, 1.35 Cheers, Emanuele Zeppieri.
Subject: autohandler
Download autohandler
application/text 178b

Message body not shown because it is not plain text.

Subject: index.html
Download index.html
text/html 76b
First chunk from index.html % $m->flush_buffer; Second chunk from index.html
Download (untitled) / with headers
text/plain 239b
On Wed Nov 22 02:29:20 2006, emazep wrote: Show quoted text
> [...] > The above mentioned tests have been executed in the following environment: > > Mac OS X 10.4.8 > perl 5.8.8 > Apache 2.0.2
Apache version is 2.2.3, sorry. Cheers, Emanuele Zeppieri.
Download (untitled) / with headers
text/plain 401b
Sorry for the slow reply. I'm not sure if this will be fixed any time soon. The interaction between filters, buffer flushing, and components with content is very hairy, and we've never really documented how it should all work. In the past, when I've tried to fix one bug with this I've usually broken some other undocumented behavior. I suspect the safest thing is to leave it as-is, warts and all.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.