Home GnuPG
Diffusion GnuPG ac3044986732

tools: Improve rfc822parse to allow access to headers for longer.

Description

tools: Improve rfc822parse to allow access to headers for longer.

* tools/rfc822parse.c (struct rfc822parse_context): Add field
this_part.
(release_handle_data): Clear this_part.
(rfc822parse_open): Set this_part.
(set_current_part_to_parent): Ditto.
(insert_header): Ditto.
(rfc822parse_enum_header_lines): Replace current_part by this_part.
(find_header): Ditto.
* tools/rfc822parse.c (my_strcasecmp): Remove.
(same_header_name): New.
(rfc822_capitalize_header_name): Use new function instead.

With this change the header function can now be sued after the
transition to the body. Thus up until thenext MIME block is reached
the headers of the former MIME block are returned.

This also fixes a problem with the "MIME-Version" header name
capitalization.

Details

Provenance
wernerAuthored on Aug 29 2024, 5:42 PM
Parents
rG80bd49224e0d: doc: Minor fix for the description of gpg's --default-*-expire
Branches
Unknown
Tags
Unknown