New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encode::MIME::Header clean up #68
Commits on Oct 6, 2016
-
-
Encode::MIME::Header: Test function use_ok() must be called in BEGIN …
…block Otherwise function prototypes will be totally ignored and our variables not parsed correctly. This is also reason for why perl throw warning message: Name "Encode::MIME::Header::STRICT_DECODE" used only once: possible typo
-
Encode::MIME::Header: Use one coding style and cleanup namespace
There are no functional changes.
-
Encode::MIME::Header: decode: In non strict mode allows spaces in MIM…
…E words Broken email clients (like Thunderbird 38) sometimes do not encode spaces and so they appear in MIME words. To make sure that Encode::MIME::Header will be able to decode emails generated by Thunderbird allow spaces in non strict mode of decoder.
-
Encode::MIME::Header: encode: Do not generate too long MIME words
Fix functions which calculate length of encoded MIME word, formula for base64 was incorrect. And do not call bytes::length() function because using it is wrong approach. Rather encode string to UTF-8 and after that count bytes with standard length().
-
-
Encode: Add function find_mime_encoding()
It acts same as find_encoding() but search only for object with mime name.
-
Encode::MIME::Header: Fix encoding and decoding of inner strings
Address https://rt.cpan.org/Public/Bug/Display.html?id=114034 * Use Encode::find_mime_encoding() for retrieving encoding object needed for inner string * Always use strict UTF-8 encoder and decoder for inner strings * Decoding inner strings is not called with flag Encode::FB_PERLQQ anymore * Propagate check flags from MIME encoder/decoder to inner string encoder/decoder Previous behaviour with Encode::FB_PERLQQ can be achieved by passing Encode::FB_PERLQQ check flag to decode().
-
Encode::MIME::Header: encode: Implement full support for check flags
Implemented is also modification of input string (when requested by flags). Now implementation of encoder now should match behaviour described in Encode module documentation.
-
Encode::MIME::Header: decode: Rewrite decoder and implement full supp…
…ort for check flags Now decoder fully respect check flags and so it does not croak anymore when it is called without any flag (or Encode::FB_DEFAULT flag) and when in input string is invalid or incorrect charset. It means that implementation of MIME decoder should match behaviour described in Encode module documentation. Invalid and unknown MIME words are not touched and they stay in decoded output as were on input. Previous behaviour (croak on unknown charset) can be achieved by passing Encode::FB_CROAK check flag to decode().
-
Encode::MIME::Header: Add tests for decoding long strings
Perl versions prior to 5.9.4 have recursive Regular expressions Engine which cause stack overflow.
-
Encode::MIME::Header: Add me into AUTHORS section
Basically I rewrote whole module so add me as author of it.
-
Encode::MIME::Header: Rewrite POD documentation
Add examples and describe what is module doing.
Commits on Oct 11, 2016
-
Encode::MIME::Header: Change names of variables and functions to bett…
…er match Encode terminology
-
Encode::MIME::Header: encode: Do not allow to set bigger size of enco…
…ded-word as 76 bytes Module MIME::Base64 has hardcoded its own limit to maximum 76 bytes per string which cannot be changed. Longer strings are first split and then each part encoded separately. Therefore for correct functionality of Encode::MIME::Header it is not possible to have larger MIME encoded-words as 76 bytes.