php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60898 Failed to upload files when content-type contain charset
Submitted: 2012-01-27 03:36 UTC Modified: 2013-03-08 22:31 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:2 (50.0%)
From: grzegorz129 at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.3.9 OS: Linux
Private report: No CVE-ID: None
 [2012-01-27 03:36 UTC] grzegorz129 at gmail dot com
Description:
------------
When I try to upload files using HTTP post with header "Content-Type: 
multipart/form-data; boundary=-----NPRequestBoundary-----" everything works as 
expected but trying to use "Content-Type: multipart/form-data; boundary=-----
NPRequestBoundary-----; charset=UTF-8" cause completely blank $_FILES array.

Expected result:
----------------
Full $_FILES array

Actual result:
--------------
Empty $_FILES array

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-05 11:25 UTC] grzegorz129 at gmail dot com
Any news on this annoying bug?
 [2012-05-18 03:10 UTC] reeze dot xia at gmail dot com
Hi, 
   how do you build the post header? by your own or with curl or such tools?

The multipart itself didn't have any charset, every part could set its charset, 
but the whole part.

Thanks.
 [2012-05-18 08:45 UTC] grzegorz129 at gmail dot com
Unfortunately I have no access to application frontend code, but I know it's 
network side was wrote using CFNetwork framework - 
https://developer.apple.com/library/mac/#documentation/Networking/Conceptual/CFNe
twork/Introduction/Introduction.html

Charset in "Content-type" is used in eg. RFC2045 [2nd page], so I think it's 
valid :)
 [2012-05-22 21:46 UTC] grzegorz129 at gmail dot com
I've found possible workaround - run script as CGI and parse php://stdin by hand 
:)
 [2013-03-08 22:05 UTC] grzegorz129 at gmail dot com
It seems to be fixed. On 5.5 alpha 6 works as expected.
Is any way to check when it has been repaired?
 [2013-03-08 22:31 UTC] grzegorz129 at gmail dot com
-Status: Open +Status: Closed
 [2013-03-08 22:31 UTC] grzegorz129 at gmail dot com
Fixed in rev #316373 according to bug #55504
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC