[Bug 11452] 4.10.22.5.5. should describe how to send the filename when the field is a file field. It should send the filename as "filename" parameter and its character encoding must be _charset_.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11452

--- Comment #9 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-05-05 22:25:16 UTC ---
Re comment 8, this is a dupe of bug 12065 as far as I can tell.

(In reply to comment #7)
> * send the string without escaping

This is definitely not entirely accurate. For example, consider a file whose
filename is what is given between the following single quote marks:

'filename newline
colon : quote " percent % five stars ★★★★★ '


Firefox uploads it with 'Content-Disposition: form-data; name="x";' followed
by:

 filename="filename newline colon : quote \" percent % five stars
★★★★★ "


WebKit uploads it with 'Content-Disposition: form-data; name="x";' followed by:

 filename="filename newline%0Acolon : quote %22 percent % five stars
★★★★★ "


(Opera couldn't find the file and I couldn't test IE.)


So conclusion: there is some escaping going on ('\"' in Firefox, '%0A' and
'%22' in WebKit), and some approximation going on (Firefox drops the newline).
But characters that aren't special are just sent in the current encoding (UTF-8
in this case).

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 5 May 2011 22:25:18 UTC