| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |