mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
fix invalid exchange html : remove inline uppercase processing instructions
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@85 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
2d52f3f942
commit
2a29a7a7c4
@ -92,7 +92,7 @@ public class ExchangeSession {
|
||||
public static final String CONTENT_TYPE_HEADER = "content-type: ";
|
||||
public static final String CONTENT_TRANSFER_ENCODING_HEADER = "content-transfer-encoding: ";
|
||||
public static final String CONTENT_DISPOSITION_HEADER = "content-disposition: ";
|
||||
public static final String CONTENT_ID_HEADER = "content-id: ";
|
||||
public static final String CONTENT_ID_HEADER = "content-id: ";
|
||||
|
||||
private static final int DEFAULT_KEEP_DELAY = 30;
|
||||
|
||||
@ -970,7 +970,7 @@ public class ExchangeSession {
|
||||
headerBuffer.append("\r\n");
|
||||
os.write(headerBuffer.toString().getBytes());
|
||||
writeBody(os, bodyHeader);
|
||||
os.write((mimeHeader.boundary+"--\r\n").getBytes());
|
||||
os.write((mimeHeader.boundary + "--\r\n").getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1327,6 +1327,7 @@ public class ExchangeSession {
|
||||
.replaceFirst("xmlns=\".*\"", "")
|
||||
// quick fix remove inline processing instructions
|
||||
.replaceAll("<\\?xml:namespace", "")
|
||||
.replaceAll("<\\?XML:NAMESPACE", "")
|
||||
// quick fix invalid comments
|
||||
.replaceAll("<!---", "<!-- -")
|
||||
.getBytes("UTF-8"));
|
||||
@ -1572,7 +1573,7 @@ public class ExchangeSession {
|
||||
contentId = contentId.substring(1);
|
||||
}
|
||||
if (contentId.endsWith(">")) {
|
||||
contentId = contentId.substring(0, contentId.length()-1);
|
||||
contentId = contentId.substring(0, contentId.length() - 1);
|
||||
}
|
||||
}
|
||||
line = fixRenamedAttachment(reader.readLine(), currentAttachmentName);
|
||||
|
Loading…
Reference in New Issue
Block a user