]> git.elephly.net Git - software/mumi.git/commitdiff
Do not attempt to decode the message body.
authorArun Isaac <arunisaac@systemreboot.net>
Sun, 27 Jan 2019 10:45:22 +0000 (16:15 +0530)
committerRicardo Wurmus <rekado@elephly.net>
Sun, 27 Jan 2019 11:55:42 +0000 (12:55 +0100)
guile-email handles decoding of the message body.

* mumi/web/download.scm (handle-download): Do not attempt to decode
the message body.

mumi/web/download.scm

index 6a7692698c7dee8a3f122f09b454dca26aa0f312..9037b641de77f08eef75c4371835ae297667763f 100644 (file)
@@ -1,5 +1,6 @@
 ;;; mumi -- Mediocre, uh, mail interface
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This program is free software: you can redistribute it and/or
 ;;; modify it under the terms of the GNU Affero General Public License
@@ -19,8 +20,6 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (email email)
-  #:use-module (email quoted-printable)
-  #:use-module (debbugs base64)
   #:use-module (ice-9 iconv)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)
@@ -49,15 +48,6 @@ PATH."
                                                                "attachment"))))
                                       (_ #f))
                                     headers)
-                        ;; Try to decode the attachment
-                        (or (and=> (assoc-ref headers 'content-transfer-encoding)
-                                   (match-lambda
-                                     (('base64)
-                                      (string-join (map (compose (cut bytevector->string <> "UTF-8") base64-decode)
-                                                        (string-split body #\newline)) "\n"))
-                                     (('quoted-printable)
-                                      (quoted-printable-decode body))
-                                     (_ #f)))
-                            body))))
+                        body)))
                (_ #f)))
       (apply render-html (unknown id))))