From:             felix-php at 7val dot com
Operating system: Debian Linux
PHP version:      5.2.11
PHP Bug Type:     cURL related
Bug description:  Renaming Uploads with ;filename= still does not work

Description:
------------
The feature described in Bug #48962 and published with PHP 5.2.11 does not
work.

As this bug tracker does not allow me to reopen a bug, I file a new one.
Please refer to the original bug for a better description.

Both code snippets given _there_ to reproduce the problem still do not
work as expected. As soon as I put ;filename=anything.here into the
@filename post-field all upload fields are empty.




Reproduce code:
---------------
client:
<?php
$ch = curl_init();
$data = array('file' => '@upload.dat;filename=asdf.txt;type=text/pain');
curl_setopt($ch, CURLOPT_URL, 'http://localhost/request.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_exec($ch);
?>

server:
<?php
var_export($_FILES);
?>

Expected result:
----------------
array (
  'file' => 
  array (
    'name' => 'asdf.txt',
    'type' => 'text/pain',
    'tmp_name' => '/tmp/phpDyg1Mf',
    'error' => 0,
    'size' => 5,
  ),
)

Actual result:
--------------
array (
  'file' => 
  array (
    'name' => '',
    'type' => '',
    'tmp_name' => '',
    'error' => 4,
    'size' => 0,
  ),
)


-- 
Edit bug report at http://bugs.php.net/?id=49589&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49589&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49589&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49589&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49589&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49589&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49589&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49589&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49589&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49589&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49589&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49589&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49589&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49589&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49589&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49589&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49589&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49589&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49589&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49589&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49589&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49589&r=mysqlcfg

Reply via email to