Separating GET and POST parameters

"Jeremy Morton" <[email protected]> Mon, 11 Jul 2005 21:41:24 +0100
Newsgroups gmane.comp.web.mason.devel
Message-ID <006101c58658$e79e6a50$a03e0252@zurg>
Hello.  I noticed from the HTML::Mason FAQ that Mason merges the GET and
POST params into the %ARGS hash.  This is kinda annoying, as sometimes I'd
like to distinguish between the two, and maybe only take action if a param
is passed a certain way.

I understand that it probably does this because it uses the CGI module
underneath, which annoyingly also merges the two.  However, maybe it could
start using CGI::Simple, which has the url_param() sub?  This sub allows
just the GET params to be accessed independently of the POST params, so a
%GETARGS and %POSTARGS hash could be added to the variables available to
HTML::Mason code.  Alternatively it could perhaps read $ENV{'QUERY_STRING'},
but unfortunately, if both POST and GET have been used to submit at the same
time, I believe the CGI module merges both of these data into one hash,
which is not what we want; CGI::Simple will only put the POST data in its
param() responses, by default, if the request method was POST.

Comments welcome!


-- 
Best regards,
Jeremy Morton (Jez) 



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar