Skip to content
Permalink
Browse files
JSIEVE-107 Minor cosmetic fixes
  • Loading branch information
Daniele Depetrini authored and chibenwa committed Aug 22, 2017
1 parent 3f68001 commit cc1688d1b9fcca25306c19168a5244a6e8d1aafc
Showing 1 changed file with 4 additions and 3 deletions.
@@ -28,12 +28,12 @@
import org.apache.jsieve.parser.address.SieveAddressBuilder;
import org.apache.jsieve.parser.generated.address.ParseException;

import javax.mail.internet.MimeUtility;
import javax.mail.Header;
import javax.mail.Message;
import javax.mail.MessagingException;
import java.io.IOException;
import java.util.*;
import javax.mail.internet.MimeUtility;
import java.io.UnsupportedEncodingException;

/**
@@ -139,10 +139,11 @@ public List<String> getHeader(String name) throws SieveMailException {
try {
String[] values = mail.getHeader(name);
if (values != null) {
//We need to do unfold headers here
// We need to do unfold headers + decoding here
result = new LinkedList<String>();
for (String value: values)
for (String value: values) {
result.add(MimeUtility.decodeText(MimeUtility.unfold(value)));
}
}
} catch (MessagingException e) {
throw new SieveMailException(e);

0 comments on commit cc1688d

Please sign in to comment.