Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Issue 9309049: Merge 106514 - contentDispositionType misparses the Content-Disposition header in some obscure co... (Closed)

8 years, 10 months ago by abarth-chromium
8 years, 10 months ago
Base URL:


Merge 106514 - contentDispositionType misparses the Content-Disposition header in some obscure corner cases Reviewed by Eric Seidel. The contentDispositionType extracts the disposition-type from the Content-Disposition header. According to RFC 6266 (and previous RFCs), the disposition-type must be an RFC 2616 token. Rather than enforce this general rule, we had special-cased some examples (including name=foo and filename=bar). This patch generalizes our check to properly validate that the disposition-type is an RFC 2616 token. In conjunction with some other work in the Chromium network stack, this causes Chromium to pass the following tests: Without this patch, these test cases neither trigger a navigation nor a download in Chromium. This patch does not appear to cause any visible change in Safari. (Safari passes these tests both before and after this patch.) * platform/network/HTTPParsers.cpp: (WebCore::isRFC2616Token): (WebCore::contentDispositionType): - This patch also adds a comment to filenameFromHTTPContentDisposition, which explains some of the was this function incorrectly implements the requirements in RFC 6266. Resolving these issues is a subject for a future patch. * platform/network/HTTPParsers.h: Committed:

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -14 lines) Patch
M Source/WebCore/platform/network/HTTPParsers.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/platform/network/HTTPParsers.cpp View 2 chunks +36 lines, -14 lines 0 comments Download


Total messages: 1 (0 generated)
8 years, 10 months ago (2012-02-02 02:07:57 UTC) #1


Powered by Google App Engine
This is Rietveld 408576698