[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 #12 from NARUSE, Yui <naruse@airemix.jp> 2011-05-06 10:03:56 UTC ---
(In reply to comment #9)
> Re comment 8, this is a dupe of bug 12065 as far as I can tell.

Ah, yes bug 12065 is also form file field and RFC2388.
Anyway, this bug's topic is mainly filename attribute of file field.

> (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:

Yes, my intention was non-ASCII characters, some ASCII characters as your
example are escaped on Firefox/WebKit.

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

I tested IE. On Windows, newline, colon and quotes are not available for
filenames, so it won't be a case.
(even if %22 can't be distinguish from escaped doble quote)

filename="C:\Documents and Settings\naruse\My Documents\filename percent %
percent22 %22 five stars ★★★★★.txt"

> The RFC2388 prose is pretty vague here (it doesn't give any requirements), but
> I agree we could be more helpful here. Would it be ok to just add a note saying
> that "implementations are encouraged to transmit non-ASCII characters in
> filenames using the selected character encoding rather than approximating the
> filename or using RFC 2231, as suggested in RFC 2388"?

I'm ok about the conclusion.

Anywai if a browser which complient RFC2231 sends the filename above, the
result will be

Content-Disposition: form-data; name="f";
 filename*0*=UTF-8'en'filename newline%0Acolon : quote %22 percent %25 five
stars
 filename*1*=%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%20

This is completely different from current implementations.

-- 
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 Friday, 6 May 2011 10:03:59 UTC