php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49589 Renaming Uploads with ;filename= still does not work
Submitted: 2009-09-18 13:35 UTC Modified: 2009-09-18 13:44 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: felix-php at 7val dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.2.11 OS: Debian Linux
Private report: No CVE-ID: None
 [2009-09-18 13:35 UTC] felix-php at 7val dot com
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,
  ),
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 13:44 UTC] jani@php.net
You can always email the one who "fixed" something. Please don't spam this system.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC