| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2011 Google Inc. All rights reserved. | 2  * Copyright (C) 2011 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions are | 5  * modification, are permitted provided that the following conditions are | 
| 6  * met: | 6  * met: | 
| 7  * | 7  * | 
| 8  *     * Redistributions of source code must retain the above copyright | 8  *     * Redistributions of source code must retain the above copyright | 
| 9  * notice, this list of conditions and the following disclaimer. | 9  * notice, this list of conditions and the following disclaimer. | 
| 10  *     * Redistributions in binary form must reproduce the above | 10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 334         while (!(line = m_lineReader.nextChunkAsUTF8StringWithLatin1Fallback()).
     isNull()) { | 334         while (!(line = m_lineReader.nextChunkAsUTF8StringWithLatin1Fallback()).
     isNull()) { | 
| 335             endOfArchiveReached = (line == endOfDocumentBoundary); | 335             endOfArchiveReached = (line == endOfDocumentBoundary); | 
| 336             if (checkBoundary && (line == endOfPartBoundary || endOfArchiveReach
     ed)) { | 336             if (checkBoundary && (line == endOfPartBoundary || endOfArchiveReach
     ed)) { | 
| 337                 endOfPartReached = true; | 337                 endOfPartReached = true; | 
| 338                 break; | 338                 break; | 
| 339             } | 339             } | 
| 340             // Note that we use line.utf8() and not line.ascii() as ascii turns 
     special characters (such as tab, line-feed...) into '?'. | 340             // Note that we use line.utf8() and not line.ascii() as ascii turns 
     special characters (such as tab, line-feed...) into '?'. | 
| 341             content->append(line.utf8().data(), line.length()); | 341             content->append(line.utf8().data(), line.length()); | 
| 342             if (contentTransferEncoding == MIMEHeader::QuotedPrintable) { | 342             if (contentTransferEncoding == MIMEHeader::QuotedPrintable) { | 
| 343                 // The line reader removes the \r\n, but we need them for the co
     ntent in this case as the QuotedPrintable decoder expects CR-LF terminated lines
     . | 343                 // The line reader removes the \r\n, but we need them for the co
     ntent in this case as the QuotedPrintable decoder expects CR-LF terminated lines
     . | 
| 344                 content->append("\r\n", 2); | 344                 content->append("\r\n", 2u); | 
| 345             } | 345             } | 
| 346         } | 346         } | 
| 347     } | 347     } | 
| 348     if (!endOfPartReached && checkBoundary) { | 348     if (!endOfPartReached && checkBoundary) { | 
| 349         WTF_LOG_ERROR("No bounday found for MHTML part."); | 349         WTF_LOG_ERROR("No bounday found for MHTML part."); | 
| 350         return nullptr; | 350         return nullptr; | 
| 351     } | 351     } | 
| 352 | 352 | 
| 353     Vector<char> data; | 353     Vector<char> data; | 
| 354     switch (contentTransferEncoding) { | 354     switch (contentTransferEncoding) { | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 415     if (!contentID.startsWith('<') || !contentID.endsWith('>')) | 415     if (!contentID.startsWith('<') || !contentID.endsWith('>')) | 
| 416         return KURL(); | 416         return KURL(); | 
| 417 | 417 | 
| 418     StringBuilder uriBuilder; | 418     StringBuilder uriBuilder; | 
| 419     uriBuilder.append("cid:"); | 419     uriBuilder.append("cid:"); | 
| 420     uriBuilder.append(contentID, 1, contentID.length() - 2); | 420     uriBuilder.append(contentID, 1, contentID.length() - 2); | 
| 421     return KURL(KURL(), uriBuilder.toString()); | 421     return KURL(KURL(), uriBuilder.toString()); | 
| 422 } | 422 } | 
| 423 | 423 | 
| 424 } // namespace blink | 424 } // namespace blink | 
| OLD | NEW | 
|---|