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

Bug #11134 patch error when CVS diff: creates empty patch
Submitted: 2007-05-24 20:00 UTC
From: tias Assigned: cellog
Status: Closed Package: pearweb (version 1.15.2)
PHP Version: Irrelevant OS:
Roadmaps: 1.16.0    
Subscription  


 [2007-05-24 20:00 UTC] tias (Tias Guns)
Description: ------------ Hi, A patch made with 'cvs diff' does not have mime-type 'ASCII C++ program text' but it has mime-type 'RCS/CVS diff output text'. pearweb currently has a filter that blocks this mime-type when trying to upload a patch. An example file can be found at http://tias.ulyssis.org/pear/Tests_pearcore_varia.patch

Comments

 [2007-05-24 20:36 UTC] cellog (Greg Beaver)
and what mimetype should we accept? text/plain is the only recognized mime type, and .patch often has no mime type at all. Just append .txt to the file name on upload
 [2007-05-24 21:30 UTC] tias (Tias Guns)
You are correct, apparently apache doesn't look at the contents of the file, like the unix command 'file' does. Do note that although pearweb gives an error, it attaches a non-existing patch at the bugreport (see test_named.patch of this bugreport). I've renamed this bugreport a bit to reflect this new bug.
 [2007-05-25 16:58 UTC] jeichorn (Joshua Eichorn)
You could use the Mime_Type package to detect the type based on the uploaded files contents
 [2007-05-25 20:40 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.