Title: [206891] trunk/Source/WebCore
- Revision
- 206891
- Author
- dba...@webkit.org
- Date
- 2016-10-06 17:51:12 -0700 (Thu, 06 Oct 2016)
Log Message
Remove unused WebCore::contentDispositionType()
https://bugs.webkit.org/show_bug.cgi?id=163095
Reviewed by Alex Christensen.
The function WebCore::contentDispositionType() was only used by the Chromium and Qt ports
to parse the Content-Disposition HTTP header. Both of these ports have long since been
removed from the repository. We should remove WebCore::contentDispositionType().
* platform/network/HTTPParsers.cpp:
(WebCore::contentDispositionType): Deleted.
* platform/network/HTTPParsers.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (206890 => 206891)
--- trunk/Source/WebCore/ChangeLog 2016-10-07 00:46:31 UTC (rev 206890)
+++ trunk/Source/WebCore/ChangeLog 2016-10-07 00:51:12 UTC (rev 206891)
@@ -1,3 +1,18 @@
+2016-10-06 Daniel Bates <daba...@apple.com>
+
+ Remove unused WebCore::contentDispositionType()
+ https://bugs.webkit.org/show_bug.cgi?id=163095
+
+ Reviewed by Alex Christensen.
+
+ The function WebCore::contentDispositionType() was only used by the Chromium and Qt ports
+ to parse the Content-Disposition HTTP header. Both of these ports have long since been
+ removed from the repository. We should remove WebCore::contentDispositionType().
+
+ * platform/network/HTTPParsers.cpp:
+ (WebCore::contentDispositionType): Deleted.
+ * platform/network/HTTPParsers.h:
+
2016-10-06 Ryosuke Niwa <rn...@webkit.org>
Upgrading and constructing element should always report exception instead of rethrowing
Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (206890 => 206891)
--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2016-10-07 00:46:31 UTC (rev 206890)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2016-10-07 00:51:12 UTC (rev 206891)
@@ -152,36 +152,6 @@
return s;
}
-ContentDispositionType contentDispositionType(const String& contentDisposition)
-{
- if (contentDisposition.isEmpty())
- return ContentDispositionNone;
-
- Vector<String> parameters;
- contentDisposition.split(';', parameters);
-
- String dispositionType = parameters[0];
- dispositionType.stripWhiteSpace();
-
- if (equalLettersIgnoringASCIICase(dispositionType, "inline"))
- return ContentDispositionInline;
-
- // Some broken sites just send bogus headers like
- //
- // Content-Disposition: ; filename="file"
- // Content-Disposition: filename="file"
- // Content-Disposition: name="file"
- //
- // without a disposition token... screen those out.
- if (!isValidHTTPToken(dispositionType))
- return ContentDispositionNone;
-
- // We have a content-disposition of "attachment" or unknown.
- // RFC 2183, section 2.8 says that an unknown disposition
- // value should be treated as "attachment"
- return ContentDispositionAttachment;
-}
-
bool parseHTTPRefresh(const String& refresh, double& delay, String& url)
{
unsigned len = refresh.length();
Modified: trunk/Source/WebCore/platform/network/HTTPParsers.h (206890 => 206891)
--- trunk/Source/WebCore/platform/network/HTTPParsers.h 2016-10-07 00:46:31 UTC (rev 206890)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.h 2016-10-07 00:51:12 UTC (rev 206891)
@@ -51,13 +51,6 @@
BlockEnabled,
};
-enum ContentDispositionType {
- ContentDispositionNone,
- ContentDispositionInline,
- ContentDispositionAttachment,
- ContentDispositionOther
-};
-
#if ENABLE(NOSNIFF)
enum ContentTypeOptionsDisposition {
ContentTypeOptionsNone,
@@ -74,7 +67,6 @@
XFrameOptionsConflict
};
-ContentDispositionType contentDispositionType(const String&);
bool isValidReasonPhrase(const String&);
bool isValidHTTPHeaderValue(const String&);
bool isValidHTTPToken(const String&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes