Re: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-04 Thread Tommaso Torti
Thank you André for the clear explanation!

Re: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread André Warnier
Josh Narins wrote: How about a little perl string manipulation? #my $a = 'key1=value1&key2=&key3=value3'; my $a = 'key1=value1&key2&key3=value3'; my $b = join "&", map { my $c = ($_ =~ m/(\S+)=(\S*)?/o) ? $_ : "$_="; $c; } split "&", $a; print "a= $a\nb= $b\n"; This is not a good idea becaus

RE: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread Josh Narins
> How about a little perl string manipulation? > > #my $a = 'key1=value1&key2=&key3=value3'; > my $a = 'key1=value1&key2&key3=value3'; > > my $b = join "&", map { my $c = ($_ =~ m/(\S+)=(\S*)?/o) ? $_ : "$_="; > $c; } split "&", $a; > > print "a= $a\nb= $b\n"; This is not a good idea because of HT

FW: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread James B. Muir
print "a= $a\nb= $b\n"; -James -Original Message- From: Randolf Richardson [mailto:rand...@modperl.pl] Sent: Tuesday, January 03, 2012 1:13 PM To: mod_perl list Subject: Re: Cannot retrieve empty keys from request using Apache2::Request.param > Tommaso Torti wrote: > &

Re: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread Randolf Richardson
> Tommaso Torti wrote: > > Hi all, > > > > i'm using mod_perl in order to retrieve all keys from a POST request with: > > > > my $request = Apache2::Request->new($r); > > my $data = $request->param(); > > > > When i receive something like > > key1=value1&key2=&key3=value3 > > $data contains all

Re: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread Tommaso Torti
Hi Andrè the input i'm receiving is not directly invoked from an html form, but it could be built from java code or php or other sources i don't even know. So i can't use javascript to fix the problem .. Thank you,

Re: Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread André Warnier
Tommaso Torti wrote: Hi all, i'm using mod_perl in order to retrieve all keys from a POST request with: my $request = Apache2::Request->new($r); my $data = $request->param(); When i receive something like key1=value1&key2=&key3=value3 $data contains all 3 keys but with key1=value1&key2&key3=v

Cannot retrieve empty keys from request using Apache2::Request.param

2012-01-03 Thread Tommaso Torti
Hi all, i'm using mod_perl in order to retrieve all keys from a POST request with: my $request = Apache2::Request->new($r); my $data = $request->param(); When i receive something like key1=value1&key2=&key3=value3 $data contains all 3 keys but with key1=value1&key2&key3=value3 $data contains on