Hi Everybody,
I've been using Mason for a few weeks now (loving it...) but I keep running
into a rather strange problem. Sometimes I'll be working on a component, paste
some HTML in it to start adding some variables and whatnot, and then the
content type of my entire output from top to bottom turns to text/plain. There
is no code or anything in it, I decided to start deleting small bits of HTML to
see why it was doing this, and found the culprit. Here is my entire element,
filename is "fixtures":
<div id="main" style="clear:all;">
<h3>Upcoming matches in the </h3>
</div>
<%attr>
body =>'fixtures'
title =>'Fixtures'
inc_css =>('fixtures.css')
</%attr>
There are some autohandlers above this to do some headers and such. Now, if
you'll turn your eyes to the </h3> tag, you'll see a space before it. Believe
it or not, if I remove this space, save, and reload the entire output is fine
again, back to text/html. I have no idea why it would do this and it seems
completely arbitrary and silly to me, but it's true. Some thoughts:
- It's not the browser, the server actually sends content-type text/plain back
to the browser
- All the output is there and looks fine, nothing missing, just the wrong
content type
- This sort of thing happened more often on other scripts, but I didnt have the
patience to start deleting bits everywhere to see what was causing it
- If I copy this component to anywhere in my mason directory the same thing
with the space happens.
- My apache config on this dev machine (within an apache virtual host) is as
follows:
<LocationMatch ^/(.*)$>
PerlSetVar MasonCompRoot /home/sites/example.com/webroot/
PerlAddVar MasonAllowGlobals %session
PerlAddVar MasonAllowGlobals $dbh
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
DefaultType text/html
</LocationMatch>
<LocationMatch ^(/(gfx|css|js|xhtml))>
SetHandler None
</LocationMatch>
Other vitals: Perl 5.8.8, HTML::Mason 1.39, Apache 2.0.59, mod_perl 2.0.3
Anyone have any idea what sort of thing could be causing this?
cheers,
Koko
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users