diff options
author | Thomas O'Dowd <[email protected]> | 2010-12-07 10:58:17 +0900 |
---|---|---|
committer | Thomas O'Dowd <[email protected]> | 2010-12-07 10:58:17 +0900 |
commit | 105fc6e844319a34df72efe6b2eb4823626a7957 (patch) | |
tree | 122f4abb07b74c9e419acf591a44581fc543d739 /lib/runtime_tools/test | |
parent | 74ec1253e1a89f0bb266831f73716a24c0798dc1 (diff) | |
download | otp-105fc6e844319a34df72efe6b2eb4823626a7957.tar.gz otp-105fc6e844319a34df72efe6b2eb4823626a7957.tar.bz2 otp-105fc6e844319a34df72efe6b2eb4823626a7957.zip |
Improve pad character handling in base64 MIME decoding functions
Implement the 'MAY' clauses from RFC4648 regarding the pad character
to make mime_decode() and mime_decode_to_string() functions more
tolerant of badly padded base64. The RFC is quoted below for easy
reference.
RFC4648 Section 3.3 with reference to MIME decoding:
Furthermore, such specifications MAY ignore the pad character, "=",
treating it as non-alphabet data, if it is present before the end of
the encoded data. If more than the allowed number of pad characters
is found at the end of the string (e.g., a base 64 string terminated
with "==="), the excess pad characters MAY also be ignored.
Diffstat (limited to 'lib/runtime_tools/test')
0 files changed, 0 insertions, 0 deletions