Skip to content
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

Merged
merged 22 commits into from Oct 26, 2016
Merged

Encode::MIME::Header clean up #68

merged 22 commits into from Oct 26, 2016

Commits on Oct 6, 2016

  1. Copy the full SHA
    2a2cc91 View commit details
    Browse the repository at this point in the history
  2. 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
    pali committed Oct 6, 2016
    Copy the full SHA
    de4ce95 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    cf1e1c0 View commit details
    Browse the repository at this point in the history
  4. Encode::MIME::Header: Use one coding style and cleanup namespace

    There are no functional changes.
    pali committed Oct 6, 2016
    Copy the full SHA
    2d6c29d View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    3cbf3e8 View commit details
    Browse the repository at this point in the history
  6. 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.
    pali committed Oct 6, 2016
    Copy the full SHA
    0dd732b View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    66c91a4 View commit details
    Browse the repository at this point in the history
  8. 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().
    pali committed Oct 6, 2016
    Copy the full SHA
    614e348 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    2d7aaee View commit details
    Browse the repository at this point in the history
  10. Encode: Add function find_mime_encoding()

    It acts same as find_encoding() but search only for object with mime name.
    pali committed Oct 6, 2016
    Copy the full SHA
    0367a8f View commit details
    Browse the repository at this point in the history
  11. 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().
    pali committed Oct 6, 2016
    Copy the full SHA
    494a455 View commit details
    Browse the repository at this point in the history
  12. 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.
    pali committed Oct 6, 2016
    Copy the full SHA
    68934e5 View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    ec880c9 View commit details
    Browse the repository at this point in the history
  14. 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().
    pali committed Oct 6, 2016
    Copy the full SHA
    7cb2405 View commit details
    Browse the repository at this point in the history
  15. 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.
    pali committed Oct 6, 2016
    Copy the full SHA
    3b3cdc4 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    2770a0b View commit details
    Browse the repository at this point in the history
  17. Copy the full SHA
    c85796f View commit details
    Browse the repository at this point in the history
  18. Copy the full SHA
    03ce818 View commit details
    Browse the repository at this point in the history
  19. Encode::MIME::Header: Add me into AUTHORS section

    Basically I rewrote whole module so add me as author of it.
    pali committed Oct 6, 2016
    Copy the full SHA
    ae1958c View commit details
    Browse the repository at this point in the history
  20. Encode::MIME::Header: Rewrite POD documentation

    Add examples and describe what is module doing.
    pali committed Oct 6, 2016
    Copy the full SHA
    dad0bc9 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2016

  1. Encode::MIME::Header: Change names of variables and functions to bett…

    …er match Encode terminology
    pali committed Oct 11, 2016
    Copy the full SHA
    ba0f5c1 View commit details
    Browse the repository at this point in the history
  2. 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.
    pali committed Oct 11, 2016
    Copy the full SHA
    6c2e4af View commit details
    Browse the repository at this point in the history