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

Bug #10498 extra symbols are appended to patches
Submitted: 2007-03-25 12:24 UTC Modified: 2007-03-26 12:09 UTC
From: techtonik Assigned: cellog
Status: Closed Package: pearweb
PHP Version: Irrelevant OS:
Roadmaps: 1.11.3    
Subscription  


 [2007-03-25 12:24 UTC] techtonik (anatoly techtonik)
Description: ------------ When downloading patches extra symbols that looks like file size are added to the end. http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=latest Also wget doesn't restore original file name, but I can't say which bug is this one. Test script: --------------- $ wget "http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1" --11:17:26-- http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1 => `patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1' Resolving pear.php.net... 216.92.131.66 Connecting to pear.php.net[216.92.131.66]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 518 [application/octet-stream] 100%[==================================================================================>] 521 --.--K/s 11:17:26 (4.97 MB/s) - `patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1' saved [521/518]) $ cat patch-display.php\?bug\=10395\&patch\=quicksearch_patch\&revision\=1174306336\&download\=1 Expected result: ---------------- --- SearchReplace_old.php Mon Mar 19 12:48:40 2007 +++ SearchReplace.php Mon Mar 19 14:09:52 2007 @@ -332,7 +332,7 @@ // because I haven't decided yet whether it is bug or feature) if ($this->php5) { - $file_array[$i] = str_replace($this->find, $this->replace, $file_array[$i], $counted); + $file = str_replace($this->find, $this->replace, $file, $counted); $occurences += $counted; } else { foreach ($local_find as $fk => $ff) { Actual result: -------------- --- SearchReplace_old.php Mon Mar 19 12:48:40 2007 +++ SearchReplace.php Mon Mar 19 14:09:52 2007 @@ -332,7 +332,7 @@ // because I haven't decided yet whether it is bug or feature) if ($this->php5) { - $file_array[$i] = str_replace($this->find, $this->replace, $file_array[$i], $counted); + $file = str_replace($this->find, $this->replace, $file, $counted); $occurences += $counted; } else { foreach ($local_find as $fk => $ff) { 518

Comments

 [2007-03-26 10:58 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2007-03-26 10:58 UTC] cellog (Greg Beaver)
by the way anatoly, the wget not restoring the original filename is probably a wget bug, every browser I've tested restores the correct filename
 [2007-03-26 12:09 UTC] techtonik (anatoly techtonik)
Maybe browsers receive an extra information after they send their headers in request? I thought wget processes content-disposition header when it gets it.