projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
84db9a0
)
add a date field if not present (rfc2822 requirement)
author
adam
<adam@megacz.com>
Sat, 22 Jul 2006 22:29:57 +0000
(22:29 +0000)
committer
adam
<adam@megacz.com>
Sat, 22 Jul 2006 22:29:57 +0000
(22:29 +0000)
darcs-hash:
20060722222957
-5007d-
ffdf05c6de98fad2d7ba187ba7d04fe944ebca37
.gz
src/org/ibex/mail/Message.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/mail/Message.java
b/src/org/ibex/mail/Message.java
index
882ca9f
..
d6ef538
100644
(file)
--- a/
src/org/ibex/mail/Message.java
+++ b/
src/org/ibex/mail/Message.java
@@
-100,6
+100,11
@@
public class Message extends MIME.Part {
this.cc = Address.list(headers.get("Cc"));
this.bcc = Address.list(headers.get("Bcc"));
this.date = parseDate(headers.get("Date")) == null ? new Date() : parseDate(headers.get("Date"));
this.cc = Address.list(headers.get("Cc"));
this.bcc = Address.list(headers.get("Bcc"));
this.date = parseDate(headers.get("Date")) == null ? new Date() : parseDate(headers.get("Date"));
+
+ // RFC2822 requires a "Date" field, so we synthesize one if missing
+ if (headers.get("Date") == null)
+ headers.set("Date", this.date.toString()); // FIXME: formatting
+
this.arrival = this.date; // FIXME wrong; grab this from traces?
}
this.arrival = this.date; // FIXME wrong; grab this from traces?
}