Skip Menu |
 

This queue is for tickets about the Apache2-FakeRequest CPAN distribution.

Report information
The Basics
Id: 75751
Status: new
Priority: 0/
Queue: Apache2-FakeRequest

People
Owner: Nobody in particular
Requestors: LEMBARK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.04
Fixed in: (no value)



Subject: The "param" call returns all params when the parameter is missing
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 4091
Download (untitled) / with headers
text/plain 3.9k
Looking for any parameter which is not present in the "param" hash returns the entire hash rather than undef or an empty string (see example below). I do not think this properly mimics the A2::Request object's behavior. DB<1> x $request 0 Apache2::FakeRequest=HASH(0x3e578b0) 'as_string' => 'POST /o/744 HTTP/1.1 Host: nn2.deasil.com:7000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110423 Gentoo Firefox/3.6.16 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Referer: http://nn2.deasil.com:7000/ Content-Length: 453 Cookie: __utmc=31815649; __utma=31815649.1206902665.1305656423.1305736495.1305742444.5; __utmz=31815649.1305656423.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none); __utmb=31815649.15.9.1305743166630 Pragma: no-cache Cache-Control: no-cache addr=445%20West%20Trade%20St.&addr2=doghouse&card_bill_addr=445%20West %20Trade %20St.&card_bill_addr2=&card_bill_city=Charlotte&card_bill_state=NC&card _bill_zip=28202&card_cvc=123&card_expiry=01%2F2013&card_name=Discover&ca rd_nick=&card_number=6011000990156527&city=Charlotte&delivery_date=3-14& delivery_time=12%3A19&em=lembark%40wrkhors.com&first_name=do%20not %20deliver&last_name=test %20order&phone=8885551212&state=NC&tip=1.00&tray=955705%2F4%2B785624%2F2 %2B4471228%2F4%2B955870%2F5&type=guest&zip=28205 ' 'headers_in' => HASH(0x4117cd0) 'Accept' => 'text/html,application/xhtml+xml,application/ xml;q=0.9,*/*;q=0.8' 'Accept-Charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' 'Accept-Encoding' => 'gzip,deflate' 'Accept-Language' => 'en-us,en;q=0.5' 'Cache-Control' => 'no-cache' 'Content-Length' => 453 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8' 'Cookie' => '__utmc=31815649; __utma=31815649.1206902665.1305656423.1305736495.1305742444.5; __utmz=31815649.1305656423.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none); __utmb=31815649.15.9.1305743166630' 'Host' => 'nn2.deasil.com:7000' 'Keep-Alive' => 115 'Pragma' => 'no-cache' 'Referer' => 'http://nn2.deasil.com:7000/' 'User-Agent' => 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110423 Gentoo Firefox/3.6.16' 'X-Requested-With' => 'XMLHttpRequest' 'method' => 'POST' 'param' => HASH(0x410da20) 'addr' => '445 West Trade St.' 'addr2' => 'doghouse' 'card_bill_addr' => '445 West Trade St.' 'card_bill_addr2' => '' 'card_bill_city' => 'Charlotte' 'card_bill_state' => 'NC' 'card_bill_zip' => 28202 'card_cvc' => 123 'card_expiry' => '01/2013' 'card_name' => 'Discover' 'card_nick' => '' 'card_number' => 6011000990156527 'city' => 'Charlotte' 'delivery_date' => '3-14' 'delivery_time' => '12:19' 'em' => 'lembark@wrkhors.com' 'first_name' => 'do not deliver' 'last_name' => 'test order' 'phone' => 8885551212 'state' => 'NC' 'tip' => 1.00 'tray' => '955705/4+785624/2+4471228/4+955870/5' 'type' => 'guest' 'zip' => 28205 'uri' => '/o/744' DB<3> x $request->param( 'card_nick' ) 0 HASH(0x410da20) 'addr' => '445 West Trade St.' 'addr2' => 'doghouse' 'card_bill_addr' => '445 West Trade St.' 'card_bill_addr2' => '' 'card_bill_city' => 'Charlotte' 'card_bill_state' => 'NC' 'card_bill_zip' => 28202 'card_cvc' => 123 'card_expiry' => '01/2013' 'card_name' => 'Discover' 'card_nick' => '' 'card_number' => 6011000990156527 'city' => 'Charlotte' 'delivery_date' => '3-14' 'delivery_time' => '12:19' 'em' => 'lembark@wrkhors.com' 'first_name' => 'do not deliver' 'last_name' => 'test order' 'phone' => 8885551212 'state' => 'NC' 'tip' => 1.00 'tray' => '955705/4+785624/2+4471228/4+955870/5' 'type' => 'guest' 'zip' => 28205


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.