Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: Source/core/platform/network/MIMEHeader.cpp

Issue 22292008: Add 8bit Content-Transfer-Encoding support for reading MHTML files (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to fix line endings #5 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/platform/network/MIMEHeader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return mimeHeader.release(); 113 return mimeHeader.release();
114 } 114 }
115 115
116 MIMEHeader::Encoding MIMEHeader::parseContentTransferEncoding(const String& text ) 116 MIMEHeader::Encoding MIMEHeader::parseContentTransferEncoding(const String& text )
117 { 117 {
118 String encoding = text.stripWhiteSpace().lower(); 118 String encoding = text.stripWhiteSpace().lower();
119 if (encoding == "base64") 119 if (encoding == "base64")
120 return Base64; 120 return Base64;
121 if (encoding == "quoted-printable") 121 if (encoding == "quoted-printable")
122 return QuotedPrintable; 122 return QuotedPrintable;
123 if (encoding == "8bit")
124 return EightBit;
123 if (encoding == "7bit") 125 if (encoding == "7bit")
124 return SevenBit; 126 return SevenBit;
125 if (encoding == "binary") 127 if (encoding == "binary")
126 return Binary; 128 return Binary;
127 LOG_ERROR("Unknown encoding '%s' found in MIME header.", text.ascii().data() ); 129 LOG_ERROR("Unknown encoding '%s' found in MIME header.", text.ascii().data() );
128 return Unknown; 130 return Unknown;
129 } 131 }
130 132
131 MIMEHeader::MIMEHeader() 133 MIMEHeader::MIMEHeader()
132 : m_contentTransferEncoding(Unknown) 134 : m_contentTransferEncoding(Unknown)
133 { 135 {
134 } 136 }
135 137
136 } 138 }
OLDNEW
« no previous file with comments | « Source/core/platform/network/MIMEHeader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698