You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James Sheridan-Peters <jr...@healthcite.com> on 2001/01/02 22:59:51 UTC

Apache::Request param() problem?

Quick summary:

Pulling parameters from a POST method using Apache::Request, largely to make
it easier to deal with multiple value variables.  The problem occurs if I
have two variables, differentiated only by case (eg. wanthelp=<something>
and wantHelp=<somethingelse>).

Given the about pseudo-values, when using apr->param('wanthelp') OR
apr->param('wantHelp') I get the same response, namely an array of two
values <something> and <somethingelse> for each.

Unfortunately, I have no control over what the variable names will be nor
how many parameters they will have, so I must handle all possible cases.  Am
I missing some parameter to make this case-sensitive?  Is there a better way
to do this than using Apache::Request?

Thanks!

 --
James Sheridan-Peters
HealthCite.com
jrsp@healthcite.com





Re: Apache::Request param() problem?

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"James Sheridan-Peters" <jr...@healthcite.com> writes:

> Quick summary:
> 
> Pulling parameters from a POST method using Apache::Request, largely to make
> it easier to deal with multiple value variables.  The problem occurs if I
> have two variables, differentiated only by case (eg. wanthelp=<something>
> and wantHelp=<somethingelse>).
> 
> Given the about pseudo-values, when using apr->param('wanthelp') OR
> apr->param('wantHelp') I get the same response, namely an array of two
> values <something> and <somethingelse> for each.
> 
> Unfortunately, I have no control over what the variable names will be nor
> how many parameters they will have, so I must handle all possible cases.  Am
> I missing some parameter to make this case-sensitive?  Is there a better way
> to do this than using Apache::Request?

Apache::Request parses the request data into apache tables, which
by nature use case-insensitive keys.  I'm afraid you're SOL if you
need to differentiate case-sensitive parameter keys like "wantHelp" and
"wanthelp" with the current implementation of libapreq/Apache::Request.  
Probably CGI is your best bet for now- but you could submit a request/bug 
report to the apreq list at

apreq-dev@httpd.apache.org

HTH.
-- 
Joe Schaefer