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.
Is it a problem with PHP or web server? As I know this form of Content-Type
is valid.
POST files uploading - multipart/form-data + UTF bug in PHP?
2.3k views Asked by kiler129 At
3
There are 3 answers
0
On
I've found dirty workaround for this problem. For me it's ofc temporary bcs it doesn't work under litespeed (I used reverse proxy to apache to avoid this problem).
<Location "/upload.php">
RequestHeader set Content-Type "multipart/form-data; boundary=-----NPRequestBoundary-----"
</Location>
It will force webserver to replace content-type header. For now I'm sure - this is a PHP bug (someone assumed that charset will occur before boundary=
)
Bug was fixed in SVN rev. #316373 (5.3.9 release covers it).