Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.1

Bug #14426 Decode of URL with GET parameters
Submitted: 2008-07-31 10:00 UTC
From: marlow Assigned: neufeind
Status: Assigned Package: Net_IDNA (version 0.7.2)
PHP Version: 5.2.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 44 = ?

 
 [2008-07-31 10:00 UTC] marlow (Mario Weber)
Description: ------------ Hello, when I decode the URL http://xn--ko-eka.de/index.php?foo=bar I get this result http://öko.de/index.phpfoo=bar The ? is missing. I changed php4.php line 2195 to fix it: #$return = join('', $parsed); $return = $parsed['scheme'].$parsed['host'].$parsed['path']; if (isset($parsed['query'])) { $return .= '?'.$parsed['query']; }

Comments

 [2009-07-24 10:26 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Feedback
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. Need a reproduce script or test before i fix this
 [2010-05-24 11:57 UTC] tokul (Tomas Kuliavas)
1. bug report talks about changes in php4.php, yet version number is set to php 5.2.0 2. both php4.php and php5.php have same bug. Test script (PHP 4.4.9, Net_IDNA 0.7.3, dublicate net_idna declaration disabled by renaming net_idna class in Net/IDNA/php4.php) ------ <?php var_dump(include('Net/IDNA.php')); $idn_instance = Net_IDNA::getInstance(); var_dump($idn_instance->decode('http://xn--ko-eka.de/index.php?foo=bar')); ------ Result --- X-Powered-By: PHP/4.4.9 Content-type: text/html int(1) string(31) "http://öko.de/index.phpfoo=bar" ------ Expected --- X-Powered-By: PHP/4.4.9 Content-type: text/html int(1) string(31) "http://öko.de/index.php?foo=bar" ------ There is nothing to think about it. Code creates URL by calling join with empty delimiter. query part needs delimiter. var_dump(parse_url('http://xn--ko-eka.de/index.php?foo=bar')); array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(13) "xn--ko-eka.de" ["path"]=> string(10) "/index.php" ["query"]=> string(7) "foo=bar" }
 [2010-05-24 14:24 UTC] tokul (Tomas Kuliavas)
one more thing. parse_data() output also includes 'port'. See how Net_IDNA decodes it. var_dump(parse_url('http://xn--ko-eka.de:8080/index.php?foo=bar'));
 [2011-09-29 14:12 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: Open