Remove DocumentWriter::deprecatedFrameEncoding()
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Sep 2011 07:54:40 +0000 (07:54 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Sep 2011 07:54:40 +0000 (07:54 +0000)
commit82aea76d7a4277ea83f580161a636c749b1150ee
treeb8c327f08b04a126133aed7644d9239fd9a67499
parent3ef4702f8bb139dbe3c2283cbd34e10661d10d97
Remove DocumentWriter::deprecatedFrameEncoding()
https://bugs.webkit.org/show_bug.cgi?id=67882

Reviewed by Eric Seidel.

Three years ago, in http://trac.webkit.org/changeset/39026, Alexey
Proskuryakov added ContentDispositionEncodingFallbackArray to work
around a web site compatibility issue with a non-ASCII file name
becoming garbled when received in the Content-Disposition header.

Since that time, there has been copious discussion of this topic among
browser vendors, in the IETF, and in the broader web community.  For
example, here is a Stack Overflow thread about this topic:

http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http

Eric Lawrence has written a blog post that summarizes IE's perspective
on this issue:

http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx

The current consensus is that browsers should implement RFC 6266,
which is a new RFC that updates the definition of the
Content-Disposition header.  Chrome and Firefox have both implemented
RFC 6266 and have encountered only one issue, which was then fixed by
the web site operator.  IE has also implemented RFC 6266, but I don't
have detailed information about their compatibility experience.

This patch add explicit PLATFORM #ifdefs around the quirky
implementation previously used in Apple's Mac and Windows ports.  This
code is already only used on Apple's ports, so this patch introduces no
functional changes.  It does, however, discourage other ports from
adopting this quirk.  IMHO, Apple should remove this quirk as soon as
compatibility allows and converge behavior with the other major browser
vendors.

See bug for manual test (the bug manifests in Safari download UI).

* loader/DocumentWriter.cpp:
* loader/DocumentWriter.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
* platform/network/ResourceRequestBase.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/DocumentWriter.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceRequestBase.h