httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: FW: Help with Apache::Request module
Date Wed, 14 Jan 2004 21:14:27 GMT
Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>Joe Schaefer wrote:
> 
> 
> [...]
> 
> 
>>>  sub auth_handler {
>>>        my $req = Apache::Request->new(shift);
>>>        if ($req->param("password") eq "foo") {
>>>            return OK;
>>>        }                else {
>>>            return AUTH_ERROR;
>>>        }
>>>  }
>>>The scalar $req->param call will cause libapreq2 to keep fetching POST
>>>data until it's found the "password" param.  If that param is near
>>>the front of the POST body, then libapreq2 will have only fetched
>>>about 64KB before returning from the param() call.
>>
>>What happens if there are two 'password' key/val pairs in the input?
>>Does it know from the context whether one is enough? .e.g will:
>>
>>   @passwords = $req->param("password");
>>
>>deterministically consume all the input?
> 
> 
> I'm not sure what the current code actually does (there's this strange
> prefetch apreq_cfg_t attribute I've been meaning to remove), but IMO 
> what it should do here is parse the entire POST.  So yes, the behavior 
> would be context-sensitive.

Good. Thanks Joe.

I forgot the CGI spec on this issue. But what happens if you ask for a single 
value, and there is more than one. Should it return the first one it has 
encountered? What happens if there is a second one?


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message