Fix JMAP: Email/query: Non-standard header values are not searchable

This commit is contained in:
Maurus Decimus
2026-06-18 17:22:45 +02:00
parent 30d12588a2
commit ef9c74821d

View File

@@ -193,19 +193,14 @@ impl ArchivedMessageMetadata {
});
}
_ => {
if (matches!(
header.value,
ArchivedMetadataHeaderValue::ContentType(_)
) || matches!(
header.name,
ArchivedMetadataHeaderName::Received
)) && let Some(header) =
if let Some(raw_value) =
raw_message.get(header.value_range())
{
let header = std::str::from_utf8(header.as_ref())
let raw_value = std::str::from_utf8(raw_value.as_ref())
.unwrap_or_default();
for word in WordTokenizer::new(header, MAX_TOKEN_LENGTH)
for word in
WordTokenizer::new(raw_value, MAX_TOKEN_LENGTH)
{
if !value.is_empty() {
value.push(' ');