From: Sam H. <sh...@ma...> - 2006-07-21 01:21:31
|
On Jul 20, 2006, at 9:14 PM, Michael Gage wrote: >> >> I tried attacking this from the other angle -- delete all the >> params from the CGI object before any form field functions can be >> called. This makes all requests (GET and POST) under both versions >> of Apache behave like POST requests under Apache 1. As far as I >> can tell, this is working. Plus, it's a much less invasive >> solution than CGIParamShim or CGIeasytags -- it's pretty much a >> one-liner in a subclass. >> >> I've added it as WeBWorK::CGIDeleteParams. I also added it as an >> alternative in WeBWorK::CGI. It needs additional testing, which I >> will give it as I continue porting efforts. >> > I thought of that but I was afraid that would mean disabling the $r- > >param() function as well. How do you keep $r->param from being > affected? CGI.pm keeps its own internal copy of the params, that it parses itself from $r->args (in the case of GET requests) or STDIN (in the case of POST requests). I clear our that list, but don't touch WeBWorK::Request. CGI and WeBWorK::Request are still inconsistent w.r.t. to params, but now they're inconsistent in a safe way. :) -sam |