Re: possible bug in Mason 1.36

Scott Lanning <[email protected]> Thu, 23 Aug 2007 10:45:27 +0200 (CEST)
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Wed, 22 Aug 2007, David E. Wheeler wrote:
> On Aug 22, 2007, at 07:02, Scott Lanning wrote:
>> So passing undef or an empty string to $r->content_type
>> are apparently two different things, undef doing nothing,
>> empty string overwriting.
>
> So, to translate, is this a Mason bug? Or a Mason feature? Does it
> need to be fixed in Mason or in Bricolage?

Well, it seems like a Mason bug to me.

The handling of whether or not headers have been sent
appears to be broken in Mason, or at least sprained.
Presumably that needs cleaned up.
I pointed out the two different ways that Mason is checking
whether headers have been sent:
sometimes with a $sent_headers variable,
sometimes with a questionable http_header_sent function.

I guess Bricolage can implement an H::M::ApacheHandler subclass
that overrides the _request_fs_type function and uses
$r->content_type(undef) instead of $r->content_type('').
Though, I mean, that method has an underscore in front of it.
It's dirty thing, anyway, that a function that's
requesting the filesystem type has a side-effect
of resetting the Content-type header. Sometimes.
Bricolage isn't exactly immaculate itself, though. ;)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/