Hi all,

 I'm wondering how to handle HEAD requests with mason.
The w3c states : "The HEAD method is identical to GET except that the
server MUST NOT return a message-body in the response."

So I'd like to know if there's a way to just send the http headers and
skip the content with Mason, so a Mason site can be standard compliant
on this point.

Would this code in my top level component (after any other call that
could modify the headers) be enough ?:

if ( $ENV{'HTTP_METHOD'} eq 'HEAD' ){
   $m->clear_buffer() ;
   $r->send_http_header() ;
   $m->abort() ;
}


Thanks for any help!

Jerome.


-- 
Jerome Eteve.
http://www.eteve.net
jer...@eteve.net

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to