Bug 15287 - WebKit does not support non ascii parameters defined in RFC2231
: WebKit does not support non ascii parameters defined in RFC2231
Status: CLOSED INVALID
: WebKit
New Bugs
: 523.x (Safari 3)
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
:
: InRadar
:
:
  Show dependency treegraph
 
Reported: 2007-09-26 08:51 PST by
Modified: 2010-09-17 08:11 PST (History)


Attachments
CGI script demonstrating the problem (213 bytes, text/plain)
2007-09-26 08:56 PST, Nir Soffer
no flags Details
Fixed test case (201 bytes, text/plain)
2008-08-16 12:37 PST, Nir Soffer
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-09-26 08:51:29 PST
WebKit based browsers do not support headers with non-ASCII parameters according to RFC 2231 <http://www.ietf.org/rfc/rfc2231.txt>. This format is supported by Firefox.

Related:
 - http://moinmo.in/MoinMoinBugs/Non_ASCII_attachments_names_corrupted_on_download
------- Comment #1 From 2007-09-26 08:56:28 PST -------
Created an attachment (id=16398) [details]
CGI script demonstrating the problem

To reproduce:
 1. Install script
 2. Access 
 3. File > Save As

Result: file name is download.py
Expected: file name should be עברית

Another way:
 1. Add link to this script in another html document, e.g. <a href="cgi-bin/download.py">download</a>
 2. Right click the link and choose "Download linked file"

Result: download to file "download.py"
Expected: download to file "עברית"

Firefox give expected result in both cases. 
------- Comment #2 From 2007-09-26 09:20:46 PST -------
<rdar://problem/5475999>
------- Comment #3 From 2007-09-26 09:23:43 PST -------
The changes required to support this completely need to be implemented at a lower level than WebKit.  This work is being tracked by the associated Radar.  I'm going to close this bug as INVALID as the issue is not at the WebKit level.

Thanks for the bug report.
------- Comment #4 From 2007-09-26 11:50:37 PST -------
See also: rdar://4727992
------- Comment #5 From 2008-06-20 02:34:21 PST -------
It would be great if somebody could update this bug with information about how work on rdar://4727992 is progressing.
------- Comment #6 From 2008-06-20 03:52:18 PST -------
As it is not a WebKit bug it is not appropriate for us to publish information about it in the WebKit bug database.
------- Comment #7 From 2008-08-15 16:54:10 PST -------
*** Bug 20407 has been marked as a duplicate of this bug. ***
------- Comment #8 From 2008-08-16 02:10:39 PST -------
regarding comment 1 and it's attachment...

The test case is incorrect. It uses

  filename*="utf-8'en'%D7%A2%D7%91%D7%A8%D7%99%D7%AA"

while it should be

  filename*=utf-8'en'%D7%A2%D7%91%D7%A8%D7%99%D7%AA

according to the "extended-initial-value" production in Section 7 of RFC 2231 (<http://greenbytes.de/tech/webdav/rfc2231.html#rfc.section.7>)
------- Comment #9 From 2008-08-16 12:37:43 PST -------
Created an attachment (id=22834) [details]
Fixed test case

This test case does not work with Safari 3.1.2 and Mac OS X 10.4.11, but works with Firefox 2 on same system.
------- Comment #10 From 2008-08-16 13:26:17 PST -------
(In reply to comment #8)
>   filename*="utf-8'en'%D7%A2%D7%91%D7%A8%D7%99%D7%AA"
>   filename*=utf-8'en'%D7%A2%D7%91%D7%A8%D7%99%D7%AA

AFAICT, these only differ in that the original one has quotation marks.

Could you please clarify why they are no allowed? It is strange to me because (1) extended-initial-value is not referenced anywhere else in RFC 2231, so formally speaking, it does not mean anything; and (2) RFC 2231 itself has an example that uses quoted strings:

   Content-Type: application/x-stuff
    title*0*=us-ascii'en'This%20is%20even%20more%20
    title*1*=%2A%2A%2Afun%2A%2A%2A%20
    title*2="isn't it!"

Does the variant with quotations marks work in other browsers?
------- Comment #11 From 2008-08-17 05:52:29 PST -------
> AFAICT, these only differ in that the original one has quotation marks.

Yes.

> Could you please clarify why they are no allowed? It is strange to me because
> (1) extended-initial-value is not referenced anywhere else in RFC 2231, so

That's a known erratum, see http://www.rfc-editor.org/errata_search.php?eid=477.

> formally speaking, it does not mean anything; and (2) RFC 2231 itself has an
> example that uses quoted strings:

But not in the initial value.

> Does the variant with quotations marks work in other browsers?

I'm going to test it, but I'm really not sure why it would matter. The spec is there for a reason.
------- Comment #12 From 2008-08-23 09:31:30 PST -------
More test cases: <http://greenbytes.de/tech/rfc2231/>

Proposed profile for use of RFC2231 encoding in HTTP: <http://greenbytes.de/tech/webdav/draft-reschke-rfc2231-in-http-latest.html>
------- Comment #13 From 2008-08-31 19:11:24 PST -------
(In reply to comment #12)
> More test cases: <http://greenbytes.de/tech/rfc2231/>
http://greenbytes.de/tech/tc2231/
------- Comment #14 From 2010-09-17 08:11:58 PST -------
In the meantime, draft-reschke-rfc2231-in-http has been published as IETF RFC 5987 on the standards track.