perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan <modperl-l...@2xlp.com>
Subject POST vs GET
Date Mon, 31 Oct 2005 23:14:54 GMT
Background Running: current stable of mp2 and libapreq-devel

Problem:
     I'm allowing GET style urls to forms for pre-population
     If the POST action is dirty though, i get cross contamination of  
vars IF there was a NULL action in the form

     ie:
         url:
           message.cgi?email=user@domain.com&subject=hello
         becomes form:
           {form action="" method=POST"}
           email: [ user@domain.com]
           subject: [ hello ]
           body: []
          {/form}

     if i submit that, then it submits the POST data (as it should)  
to the url message.cgi?email=user@domain.com&subject=hello

    when i access that info with ->param('fieldname'), the url data  
in the get string takes precedence and ignores the POST

obviously, the correct recourse is to go through all of my templates,  
make sure that there is a valid and specified page that the action is  
posting to, and yell at those who left those fields blank in  
templates they gave to me.

but, can i hope (can i? seriously.) that there is some mechanism in  
mp2/libapreq that will let me explcitly choose whether param is  
pulling POST or GET data for a given fieldname - so i can put a  
temporary solution in place?  because I really not in a template- 
fixing mood right now , and i'd rather just use some code until later.


Mime
View raw message