[geary: 15/23] Return raw but unfolded header values (fixes message-test)



commit b0df4d5fd8dcf5788d0fdd1b217ac06f694db599
Author: Torben <torben letorbi gmail com>
Date:   Mon Dec 16 00:31:07 2019 +0100

    Return raw but unfolded header values (fixes message-test)

 src/engine/rfc822/rfc822-message-data.vala | 2 +-
 src/engine/rfc822/rfc822-message.vala      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-message-data.vala b/src/engine/rfc822/rfc822-message-data.vala
index b5d62ad5..814e071c 100644
--- a/src/engine/rfc822/rfc822-message-data.vala
+++ b/src/engine/rfc822/rfc822-message-data.vala
@@ -323,7 +323,7 @@ public class Geary.RFC822.Header : Geary.MessageData.BlockMessageData, Geary.RFC
     }
 
     public string? get_header(string name) throws RFC822Error {
-        return get_headers().get_header(name).get_value();
+        return GMime.utils_header_unfold(get_headers().get_header(name).get_raw_value());
     }
 
     public string[] get_header_names() throws RFC822Error {
diff --git a/src/engine/rfc822/rfc822-message.vala b/src/engine/rfc822/rfc822-message.vala
index 6e5712b2..fe606582 100644
--- a/src/engine/rfc822/rfc822-message.vala
+++ b/src/engine/rfc822/rfc822-message.vala
@@ -895,7 +895,7 @@ public class Geary.RFC822.Message : BaseObject, EmailHeaderSet {
         for (int i = 0; i < headers.get_count(); i++) {
             GMime.Header header = headers.get_header_at(i);
             string name = header.get_name();
-            string value = header.get_value();
+            string value = GMime.utils_header_unfold(header.get_raw_value());
             switch (name.down()) {
               case "from":
                   this.from = append_address(this.from, value);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]