I'm trying to upload file, using XMLHTTPRequest, and sending this headers:
Content-Type:multipart/form-data, boundary=xxxxxxxxx
--xxxxxxxxx
Content-Disposition: form-data; name='uploadfile'; filename='123_logo.jpg'
Content-Transfer-Encoding: base64
Content-Type: image/jpeg
/*base64data*/
But on server side PHP ignore header "Content-Transfer-Encoding: base64" and write base64 undecoded data directly into the file!
Is there any way to fix it?
p.s. it is very important to send data using base64
My previous answer was wrong
Content-Transfer-Encoding
may appear in the a composite bodyhttp://www.ietf.org/rfc/rfc2616.txt
Xavier's answer doesn't sound right. RFC2616 also has this to say (section 3.7):
It seems to me that section 19.4 of RFC2616 is talking about HTTP as a whole, in the sense that it uses a syntax similar to MIME (like headers format), but is not MIME-compliant.
Also, there is RFC2388. In section 3, last paragraph, it says:
Section 4.3 elaborates on this: