Index: Source/platform/network/HTTPParsers.cpp |
diff --git a/Source/platform/network/HTTPParsers.cpp b/Source/platform/network/HTTPParsers.cpp |
index 772188d21ae5cd135882ab668c53a9a25f92c082..e557188493514fe12aec80518c21f6f428266bd0 100644 |
--- a/Source/platform/network/HTTPParsers.cpp |
+++ b/Source/platform/network/HTTPParsers.cpp |
@@ -266,7 +266,7 @@ String filenameFromHTTPContentDisposition(const String& value) |
return String(); |
} |
-String extractMIMETypeFromMediaType(const String& mediaType) |
+AtomicString extractMIMETypeFromMediaType(const AtomicString& mediaType) |
{ |
StringBuilder mimeType; |
unsigned length = mediaType.length(); |
@@ -298,7 +298,7 @@ String extractMIMETypeFromMediaType(const String& mediaType) |
if (mimeType.length() == length) |
return mediaType; |
- return mimeType.toString(); |
+ return mimeType.toAtomicString(); |
} |
String extractCharsetFromMediaType(const String& mediaType) |
@@ -607,15 +607,15 @@ size_t parseHTTPRequestLine(const char* data, size_t length, String& failureReas |
return end - data; |
} |
-size_t parseHTTPHeader(const char* start, size_t length, String& failureReason, AtomicString& nameStr, String& valueStr) |
+size_t parseHTTPHeader(const char* start, size_t length, String& failureReason, AtomicString& nameStr, AtomicString& valueStr) |
{ |
const char* p = start; |
const char* end = start + length; |
Vector<char> name; |
Vector<char> value; |
- nameStr = AtomicString(); |
- valueStr = String(); |
+ nameStr = nullAtom; |
+ valueStr = nullAtom; |
for (; p < end; p++) { |
switch (*p) { |
@@ -665,7 +665,7 @@ size_t parseHTTPHeader(const char* start, size_t length, String& failureReason, |
return 0; |
} |
nameStr = AtomicString::fromUTF8(name.data(), name.size()); |
- valueStr = String::fromUTF8(value.data(), value.size()); |
+ valueStr = AtomicString::fromUTF8(value.data(), value.size()); |
if (nameStr.isNull()) { |
failureReason = "Invalid UTF-8 sequence in header name"; |
return 0; |