Fix JMAP: Email/query: Non-standard header values are not searchable
This commit is contained in:
@@ -193,19 +193,14 @@ impl ArchivedMessageMetadata {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if (matches!(
|
if let Some(raw_value) =
|
||||||
header.value,
|
|
||||||
ArchivedMetadataHeaderValue::ContentType(_)
|
|
||||||
) || matches!(
|
|
||||||
header.name,
|
|
||||||
ArchivedMetadataHeaderName::Received
|
|
||||||
)) && let Some(header) =
|
|
||||||
raw_message.get(header.value_range())
|
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();
|
.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() {
|
if !value.is_empty() {
|
||||||
value.push(' ');
|
value.push(' ');
|
||||||
|
|||||||
Reference in New Issue
Block a user