On Mar 7, 2012, at 1:49 AM, Pedro Melo wrote:

> On Wed, Mar 7, 2012 at 12:11 AM, Jonathan Swartz <swa...@pobox.com> wrote:
>> I hear your concerns. So I'm not sure which of these you are suggesting:
>> 1) Substitution tags should be HTML-escaped by default in Mason.
> 
> This one would be my choice *if* Mason was used only for the web.
> 

I still think it is difficult to est this default, given that substitution tags 
can be used when generating javascript, JSON, css, etc. even in a web 
environment.  At the very least we'd need the ability to turn the default 
on/off on a per-component or directory basis, rather than for an entire site.

> 
>> 2) DefaultFilter should be implemented and documented in core Mason, so that 
>> it doesn't require a separate plugin install.
> 
> I think this should happen either way. Maybe not move into the core,
> but at least document it, and remove the big scary CAVEAT section from
> the DefaultFilter docs (I know its not your module, but I think if you
> suggested it to Stephen he would agree).

For now, I've added DefaultFilter to the Mason documentation in multiple places.

> The previous paragraph, and the fact that we can't target components
> to specific HTTP methods (like Dave mentioned in the GET/POST
> parameters thread), argue that the Mason dispatcher is a bit too
> limited. I have mixed feelings about it. On one hand I like that its
> simple, just drop files into a directory and you are done. On the
> other, if we could add route filters for HTTP method, mime/type and/or
> others, we could tweak the defaults for each request, and provide
> saner HTTP error codes.


The Mason dispatcher will probably always be feature-light compared with other 
frameworks. But adding the ability to filter on GET/POST does seem reasonable. 
Suggestions on syntax welcome. It could be a class method, e.g.

    CLASS->allow_http_methods('POST');

or perhaps Mason looks for specifically named methods, e.g.

    method handle_POST {
        ...
    }


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to