use correct key when sending filenames

adding an asterisk to the filename key
REQUIRES two apostrope-delimiters in the value as of charset'lang'name,
see rfc2231

as we do use the value this way, we MUST not add the asterisk.

things worked correctly in the past as
consuming MUAs are pretty graceful.

i assume the error comes from the c to rust conversion -
core-c did add the asterisk, however also did the apostrope-encoding.
core-rust leaves the asterisk but changes encoding.
This commit is contained in:
B. Petersen
2020-12-06 01:34:59 +01:00
committed by link2xt
parent 8fcb8c3788
commit 7b291c1416

View File

@@ -1180,7 +1180,7 @@ async fn build_body_file(
// run into other problems ...
let cd_value = if needs_encoding(&filename_to_send) {
format!(
"attachment; filename*=\"{}\"",
"attachment; filename=\"{}\"",
encode_words(&filename_to_send)
)
} else {