Commit 37f87dce 37f87dce4a7b47cb4b61163b6f66ea6658eaf23b by Sergey Poznyakoff

Allow for a sequence of semicolons before kw/value pair in a structured header.

* mailbox/mimehdr.c (_header_get_param): Skip superfluous semicolons.
1 parent b4b8b6ec
...@@ -144,6 +144,18 @@ _header_get_param (const char *field_body, ...@@ -144,6 +144,18 @@ _header_get_param (const char *field_body,
144 144
145 /* walk upto start of param */ 145 /* walk upto start of param */
146 p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE); 146 p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE);
147
148 /* Reportedly, some MUAs insert several semicolons */
149 if (*p == ';')
150 continue;
151
152 /* Ignore stray characters */
153 if (_ISSPECIAL (*p))
154 {
155 p = strchr (p, ';');
156 continue;
157 }
158
147 if ((ep = strchr (p, '=')) == NULL) 159 if ((ep = strchr (p, '=')) == NULL)
148 break; 160 break;
149 /* Allow for optional whitespace after '=' */ 161 /* Allow for optional whitespace after '=' */
......