[dovecot/core] b8dc77: lib-imap: imap-bodystructure: Fixed handling of a ...

GitHub noreply at github.com
Wed Apr 12 12:00:16 EEST 2017


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: b8dc77b4576f547d67ffafca5a2d9b3a7b7f8798
      https://github.com/dovecot/core/commit/b8dc77b4576f547d67ffafca5a2d9b3a7b7f8798
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2017-04-12 (Wed, 12 Apr 2017)

  Changed paths:
    M src/lib-imap/imap-bodystructure.c

  Log Message:
  -----------
  lib-imap: imap-bodystructure: Fixed handling of a multipart part without children in imap_bodystructure_write().

In that case it writes an empty text/plain part to prevent generating an invalid BODYSTRUCURE.
However, it always generated the basic BODY version without the extra fields for a full BODYSTRUCTURE.


  Commit: 9c8ed726b5b58ec7935404031286205b1b158ab3
      https://github.com/dovecot/core/commit/9c8ed726b5b58ec7935404031286205b1b158ab3
  Author: Stephan Bosch <stephan.bosch at dovecot.fi>
  Date:   2017-04-12 (Wed, 12 Apr 2017)

  Changed paths:
    M src/lib-imap/imap-bodystructure.c
    M src/lib-imap/test-imap-bodystructure.c

  Log Message:
  -----------
  lib-imap: imap-bodystructure: Fixed handling of a multipart part without children in imap_bodystructure_parse().

In imap_bodystructure_write(), an empty multipart part is addressed by generating an empty text/plain part.
However, when parsing that back with imap_bodystructure_parse() against a parsed message_part tree, this case needs to be considered explicitly.
Otherwise, it will not be able to match the message part hierarchies.

This adds a test suite item that tests both the write (previous commit) and parse functions.


Compare: https://github.com/dovecot/core/compare/b30e3dab856d...9c8ed726b5b5


More information about the dovecot-cvs mailing list