[PHP-BUG] Bug #53703 [NEW]: Cannot upload patches with chars < chr(32)

[email protected] ("jthijssen at noxlogic dot nl")
Newsgroups php.webmaster
Message-ID <[email protected]>
From:             
Operating system: NA
PHP version:      Irrelevant
Package:          Website problem
Bug Type:         Bug
Bug description:Cannot upload patches with chars < chr(32)

Description:
------------
The "add-a-patch" system in the php.net bug tracker will check for
mime-types after uploading a patch. When a file has some low
ascii-characters, it will not be detected correctly as a plain text file.
The upload will not success in that case.

There are some files in the php sources that have these low ascii
characters present so patches on those files cannot be uploaded correctly.

Test script:
---------------
The files:
  ext/standard/tests/strings/strip_tags_variation5.phpt 
  ext/standard/tests/strings/strip_tags_variation8.phpt 
  ext/standard/tests/strings/strip_tags_variation9.phpt 
have some low ascii characters: ^K and ^L. Because of this, linux' "file"
command detect those files "incorrectly":

jthijssen@debian-jth:~/php-src-5.3$ file
ext/standard/tests/strings/strip_tags_variation5.phpt 
ext/standard/tests/strings/strip_tags_variation5.phpt: data
jthijssen@debian-jth:~/php-src-5.3$ file
ext/standard/tests/strings/strip_tags_variation4.phpt 
ext/standard/tests/strings/strip_tags_variation4.phpt: ASCII C program text

Expected result:
----------------
The patch should be added to the bug

Actual result:
--------------
The bug database reports an incorrect filetype (detected:
application/octet-stream)

-- 
Edit bug report at http://bugs.php.net/bug.php?id=53703&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53703&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53703&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53703&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53703&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53703&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53703&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53703&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53703&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53703&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53703&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53703&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53703&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53703&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53703&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53703&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53703&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53703&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53703&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53703&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53703&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53703&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.