diff --git a/apps/susimail/src/src/i2p/susi/webmail/Mail.java b/apps/susimail/src/src/i2p/susi/webmail/Mail.java index a1348ea62e37ec3cb5ace0d91e763d8280e9c157..894d63b5fc31c5cc535ae1c13ecbb7b94904e4c7 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/Mail.java +++ b/apps/susimail/src/src/i2p/susi/webmail/Mail.java @@ -335,7 +335,7 @@ class Mail { private static final DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); private static final DateFormat localDateFormatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); - private static final DateFormat longLocalDateFormatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); + private static final DateFormat longLocalDateFormatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT); static { // the router sets the JVM time zone to UTC but saves the original here so we can get it TimeZone tz = SystemVersion.getSystemTimeZone(); diff --git a/apps/susimail/src/src/i2p/susi/webmail/MailPart.java b/apps/susimail/src/src/i2p/susi/webmail/MailPart.java index 2068cd198aa00fdd0798ef9399799844a32226de..54d4eec9e84f6f315c9e71b28a8e41647d7efdd2 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/MailPart.java +++ b/apps/susimail/src/src/i2p/susi/webmail/MailPart.java @@ -361,7 +361,7 @@ class MailPart { String result = null; int h = 0; int l = attributeName.length(); - while( true ) { + while (result == null) { int i = lineLC.indexOf(attributeName, h); // System.err.println( "i=" + i ); if( i == -1 ) @@ -466,4 +466,29 @@ class MailPart { ); return buf.toString(); } + +/**** + public static void main(String[] args) { + String test = "Content-Type: multipart/alternative; boundary=\"__________MIMEboundary__________\"; charset=\"UTF-8\""; + System.out.println(test); + String hlc = test.toLowerCase(Locale.US); + if (hlc.startsWith( "content-type: ")) { + System.out.println("find first attribute"); + String x_type = getFirstAttribute(test).toLowerCase(Locale.US); + String x_charset = null; + String boundary = null; + System.out.println("find boundary"); + String str = getHeaderLineAttribute(test, "boundary"); + if( str != null ) + boundary = str; + System.out.println("find charset"); + str = getHeaderLineAttribute(test, "charset"); + if( str != null ) + x_charset = str.toUpperCase(Locale.US); + System.out.println("Type: " + x_type + + "\nBoundary: " + boundary + + "\nCharset: " + x_charset); + } + } +****/ } diff --git a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java index 4f22898ac4a7a5f51b667da309ab82a0ad36c9f3..1157fd36e1aee25ef59ce64c6d01dc625d505cff 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java +++ b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java @@ -641,7 +641,7 @@ public class WebMail extends HttpServlet if (chosen.equals(subPart)) continue; out.println( "<!-- " ); - out.println( "Debug: Not showing alternative Mail Part at level " + (level + 1) + " with hash code " + mailPart.hashCode()); + out.println( "Debug: Not showing alternative Mail Part at level " + (level + 1) + " with hash code " + subPart.hashCode()); out.println( "Debug: Mail Part headers follow"); for( int i = 0; i < subPart.headerLines.length; i++ ) { out.println( subPart.headerLines[i].replace("--", "--") );