Fix parsing of Content-Type and Content-Disposition headers
Correctly handle character set and language info embedded in parameter values, and eventual parameter value continuations as per RFC 2231, Section 3. * include/mailutils/assoc.h (mu_assoc_is_empty): New proto. * libmailutils/base/assoc.c (mu_assoc_is_empty): New function. * include/mailutils/mime.h (mu_mime_header_parse): Output charset is char const *. * libmailutils/mime/mimehdr.c (mu_mime_header_parse): Likewise. * include/mailutils/util.h (mu_content_type) <param>: Change type to mu_assoc_t (mu_param): Remove structure declaration. (mu_content_type_parse): Take an optional output charset. * libmailutils/base/ctparse.c (mu_content_type_parse): Rewrite using mu_mime_header_parse. * imap4d/fetch.c (send_parameter_list): Rewrite using mu_mime_header_parse. (format_param): Use base64 for parameter values with explicit charsets. * libmailutils/tests/conttype.c: Reflect the changes to struct mu_content_type
Showing
8 changed files
with
108 additions
and
276 deletions
-
Please register or sign in to post a comment