Use uppercase keys to read attachments' name v1 PROPOSED

Zoltan Kalmar: 1
 Use uppercase keys to read attachments' name

 1 files changed, 2 insertions(+), 2 deletions(-)
Better fix: convert to lower-case in go-imap, just like the stdlib
does [1].

[1]: https://golang.org/src/mime/mediatype.go?s=3622:3707#L335
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/aerc/patches/11250/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Use uppercase keys to read attachments' name Export this patch

It seems that every key is converted to uppercase for multipart
 widgets/msgviewer.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index f06b787..3b3750f 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -351,9 +351,9 @@ func (ps *PartSwitcher) Draw(ctx *ui.Context) {
		name := fmt.Sprintf("%s/%s",
		if filename, ok := part.part.DispositionParams["filename"]; ok {
		if filename, ok := part.part.DispositionParams["FILENAME"]; ok {
			name += fmt.Sprintf(" (%s)", filename)
		} else if filename, ok := part.part.Params["name"]; ok {
		} else if filename, ok := part.part.Params["NAME"]; ok {
			// workaround golang not supporting RFC2231 besides ASCII and UTF8
			name += fmt.Sprintf(" (%s)", filename)
This is not generally the case. You should make this case insensitive,
not force the conversion to uppercase.