RSPAMD_FTOK_ASSIGN (&srch, "charset");
- if (rspamd_ftok_casecmp (¶m->name, &srch) == 0) {
+ if (rspamd_ftok_icase_equal (¶m->name, &srch)) {
/* Adjust charset */
found = param;
ct->charset.begin = param->value.begin;
RSPAMD_FTOK_ASSIGN (&srch, "boundary");
- if (rspamd_ftok_casecmp (¶m->name, &srch) == 0) {
+ if (rspamd_ftok_icase_equal (¶m->name, &srch)) {
found = param;
gchar *lc_boundary;
/* Adjust boundary */
}
if (!found) {
- /* Just lowercase */
- rspamd_str_lc ((gchar *)param->value.begin, param->value.len);
+ RSPAMD_FTOK_ASSIGN (&srch, "name");
+ if (!rspamd_ftok_icase_equal (¶m->name, &srch)) {
+ /* Just lowercase */
+ rspamd_str_lc ((gchar *) param->value.begin, param->value.len);
+ }
}
}
srch.begin = "filename";
srch.len = 8;
- if (rspamd_ftok_casecmp (¶m->name, &srch) == 0) {
+ if (rspamd_ftok_icase_equal (¶m->name, &srch)) {
/* Adjust filename */
cd->filename.begin = param->value.begin;
cd->filename.len = param->value.len;