Skip to content
Permalink
Browse files
JSIEVE-107 Always do unfold headers to fix long header test match
  • Loading branch information
Daniele Depetrini authored and chibenwa committed Aug 22, 2017
1 parent e0fb5e3 commit 2412c4f8cccec285fdb1af9986447f35a9f2284d
Showing 1 changed file with 5 additions and 1 deletion.
@@ -33,6 +33,7 @@
import javax.mail.MessagingException;
import java.io.IOException;
import java.util.*;
import javax.mail.internet.MimeUtility;

/**
* Checks script execution for an email. The wrapped email is set by called
@@ -137,7 +138,10 @@ public List<String> getHeader(String name) throws SieveMailException {
try {
String[] values = mail.getHeader(name);
if (values != null) {
result = Arrays.asList(values);
//We need to do unfold headers here
result = new LinkedList<String>();
for (String value: values)
result.add(MimeUtility.unfold(value));
}
} catch (MessagingException e) {
throw new SieveMailException(e);

0 comments on commit 2412c4f

Please sign in to comment.