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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: felix-php at 7val dot com
New email:
PHP Version: OS:

 

 [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: Mon Nov 11 01:01:29 2024 UTC